Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2013-10-09 01:17:24 +0400
committerDalai Felinto <dfelinto@gmail.com>2013-10-09 01:17:24 +0400
commit4abb8fde95260e692b3cd5b5b2f8bcd1d1f3be3b (patch)
tree9c3d68aa7abd18ddfef5b3af643b8a7556903e18 /source/blender/imbuf/intern/IMB_filetype.h
parent590f58d45583f36522ffbcebd68b4a6c921bebeb (diff)
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.
Diffstat (limited to 'source/blender/imbuf/intern/IMB_filetype.h')
-rw-r--r--source/blender/imbuf/intern/IMB_filetype.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/IMB_filetype.h b/source/blender/imbuf/intern/IMB_filetype.h
index 3c8b29cf68a..9327c15c415 100644
--- a/source/blender/imbuf/intern/IMB_filetype.h
+++ b/source/blender/imbuf/intern/IMB_filetype.h
@@ -39,8 +39,10 @@ typedef struct ImFileType {
void (*exit)(void);
int (*is_a)(unsigned char *buf);
+ int (*is_a_filepath)(const char *name);
int (*ftype)(struct ImFileType *type, struct ImBuf *ibuf);
struct ImBuf *(*load)(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]);
+ struct ImBuf *(*load_filepath)(const char *name, int flags, char colorspace[IM_MAX_SPACE]);
int (*save)(struct ImBuf *ibuf, const char *name, int flags);
void (*load_tile)(struct ImBuf *ibuf, unsigned char *mem, size_t size, int tx, int ty, unsigned int *rect);
@@ -50,6 +52,7 @@ typedef struct ImFileType {
} ImFileType;
extern ImFileType IMB_FILE_TYPES[];
+extern ImFileType *IMB_FILE_TYPES_LAST;
void imb_filetypes_init(void);
void imb_filetypes_exit(void);