Blender Git Loki
Git Commits -> Revision 23c71a5
Revision 23c71a5 by Campbell Barton (master) November 10, 2020, 11:25 (GMT) |
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 |
Commit Details:
Full Hash: 23c71a5fab42e22266196a45f1f2ac77e815bcd3
Parent Commit: d2ab9b5
Lines Changed: +58, -40
6 Modified Paths:
/source/blender/imbuf/IMB_imbuf.h (+2, -0) (Diff)
/source/blender/imbuf/intern/filetype.c (+2, -15) (Diff)
/source/blender/imbuf/intern/IMB_filetype.h (+0, -1) (Diff)
/source/blender/imbuf/intern/oiio/openimageio_api.cpp (+4, -10) (Diff)
/source/blender/imbuf/intern/oiio/openimageio_api.h (+1, -1) (Diff)
/source/blender/imbuf/intern/util.c (+49, -13) (Diff)
/source/blender/imbuf/intern/filetype.c (+2, -15) (Diff)
/source/blender/imbuf/intern/IMB_filetype.h (+0, -1) (Diff)
/source/blender/imbuf/intern/oiio/openimageio_api.cpp (+4, -10) (Diff)
/source/blender/imbuf/intern/oiio/openimageio_api.h (+1, -1) (Diff)
/source/blender/imbuf/intern/util.c (+49, -13) (Diff)