diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-10 14:16:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-10 14:25:05 +0300 |
commit | 23c71a5fab42e22266196a45f1f2ac77e815bcd3 (patch) | |
tree | 66dd61354a80166b99de0539b1f704ba3986f396 /source/blender/imbuf/intern/IMB_filetype.h | |
parent | d2ab9b568e854457414e779dcceb6f48968de4d0 (diff) |
ImBuf: support detecting the file format from in-memory images
Add `IMB_ispic_type_from_memory` so we can detect the file format
of in-memory images.
This removes `is_a_filepath` callback and uses a magic check for
photo-shop files that's compatible with OIIO.
Even though OIIO doesn't support packed images, we can still use the
file magic for detecting the format.
This change allows D9500 (a fix for unpacking images),
to be implemented without a significant performance penalty,
although the actual performance cost would depend heavily on the
blend file.
Reviewed By: dfelinto, sergey
Ref D9517
Diffstat (limited to 'source/blender/imbuf/intern/IMB_filetype.h')
-rw-r--r-- | source/blender/imbuf/intern/IMB_filetype.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/IMB_filetype.h b/source/blender/imbuf/intern/IMB_filetype.h index 53d9a1a2919..b7763976853 100644 --- a/source/blender/imbuf/intern/IMB_filetype.h +++ b/source/blender/imbuf/intern/IMB_filetype.h @@ -33,7 +33,6 @@ typedef struct ImFileType { void (*exit)(void); int (*is_a)(const unsigned char *buf); - int (*is_a_filepath)(const char *filepath); int (*ftype)(const struct ImFileType *type, const struct ImBuf *ibuf); struct ImBuf *(*load)(const unsigned char *mem, size_t size, |