diff options
author | Kent Mein <mein@cs.umn.edu> | 2005-11-22 21:50:03 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2005-11-22 21:50:03 +0300 |
commit | 00f266c651a52027b662f725d081af6b51aae343 (patch) | |
tree | 40fd6d4d9a76f1eddcc63e5af6091c1442922dca /source/blender/imbuf/intern/readimage.c | |
parent | b63e26e109ba8c651ea20f553e3ca8e0604fc73f (diff) |
This is a modified version of patch #2995
To enable dynamic tiff support.
I had to fix some of the logic in the fileselect box for icons,
I also expanded the patch to look in various default locations for
a dynamic libtiff.so/libtiff.dll
and look at the env variable BF_TIFF_LIB if it can't find it automatically.
If unable to load the library it prints a message about setting BF_TIFF_LIB
to the console.
I haven't been able to test it on a lot of platforms but hopefully it
will just work ;) I added the files to scons but have not had a chance to
test that as well.
Kent
Diffstat (limited to 'source/blender/imbuf/intern/readimage.c')
-rw-r--r-- | source/blender/imbuf/intern/readimage.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c index 166b1d6af81..779401c3183 100644 --- a/source/blender/imbuf/intern/readimage.c +++ b/source/blender/imbuf/intern/readimage.c @@ -50,6 +50,7 @@ #include "IMB_hamx.h" #include "IMB_jpeg.h" #include "IMB_bmp.h" +#include "IMB_tiff.h" #include "IMB_radiance_hdr.h" #include "BKE_global.h" @@ -129,6 +130,11 @@ ImBuf *IMB_ibImageFromMemory(int *mem, int size, int flags) { ibuf = imb_loadtarga((uchar *)mem, flags); if (ibuf) return(ibuf); + if (G.have_libtiff) { + ibuf = imb_loadtiff((uchar *)mem, size, flags); + if (ibuf) return(ibuf); + } + ibuf = imb_loadhdr((uchar*)mem, size, flags); if (ibuf) return (ibuf); |