Photoshop PSD support
authorDalai Felinto <dfelinto@gmail.com>
Tue, 8 Oct 2013 21:17:24 +0000 (21:17 +0000)
committerDalai Felinto <dfelinto@gmail.com>
Tue, 8 Oct 2013 21:17:24 +0000 (21:17 +0000)
commit4abb8fde95260e692b3cd5b5b2f8bcd1d1f3be3b
tree9c3d68aa7abd18ddfef5b3af643b8a7556903e18
parent590f58d45583f36522ffbcebd68b4a6c921bebeb
Photoshop PSD support

We now support the combined layer of Photoshop files (stored as layer 0
in the file). This way users can keep their files as multilayer PSD and
Blender always handle them as flat images.

For perfect alpha this requires an OpenImageIO update:
https://github.com/OpenImageIO/oiio/commit/342cc2633ff590a3bb278481c61ae798c7148361

Photoshop sample files:
https://github.com/OpenImageIO/oiio-images

Brecht has some pending fixes to push for OIIO as well, so we may as
well wait to update our libraries.

What works:
===========
* 8bit images (with or without alpha)
* 16bits images (alpha discarded)
* Photoshop files saved with 'Maximum Compatibility'
* Cycles, Blender internal,  BGE (and player)

Known limitations
(due to OIIO dependency):
=========================
* Images with less than 4 channels show a wrong thumbnail (bug may be in  OIIO)
* Packed images are not supported
* We do not write PSD files.

Note: old Blenders have support for PSD via Quicktime library. But due
to license issues this was discontinued.

Many thanks for Brecht van Lommel for reviewing the patch, suggesting
multiple improvements and to help solving the alpha issue.
26 files changed:
CMakeLists.txt
SConstruct
source/blender/CMakeLists.txt
source/blender/blenkernel/intern/image.c
source/blender/editors/space_file/CMakeLists.txt
source/blender/editors/space_image/CMakeLists.txt
source/blender/imbuf/CMakeLists.txt
source/blender/imbuf/IMB_imbuf.h
source/blender/imbuf/IMB_imbuf_types.h
source/blender/imbuf/intern/IMB_filetype.h
source/blender/imbuf/intern/colormanagement.c
source/blender/imbuf/intern/filetype.c
source/blender/imbuf/intern/oiio/CMakeLists.txt [new file with mode: 0644]
source/blender/imbuf/intern/oiio/SConscript [new file with mode: 0644]
source/blender/imbuf/intern/oiio/openimageio_api.cpp [new file with mode: 0644]
source/blender/imbuf/intern/oiio/openimageio_api.h [new file with mode: 0644]
source/blender/imbuf/intern/oiio/openimageio_stub.cpp [new file with mode: 0644]
source/blender/imbuf/intern/readimage.c
source/blender/imbuf/intern/util.c
source/blender/imbuf/intern/writeimage.c
source/blender/makesdna/DNA_scene_types.h
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/rna_scene.c
source/blender/python/intern/CMakeLists.txt
source/blenderplayer/CMakeLists.txt
source/creator/CMakeLists.txt