From 00f266c651a52027b662f725d081af6b51aae343 Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Tue, 22 Nov 2005 18:50:03 +0000 Subject: 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 --- source/blender/imbuf/intern/writeimage.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/imbuf/intern/writeimage.c') diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c index 148597dda35..340f8ace415 100644 --- a/source/blender/imbuf/intern/writeimage.c +++ b/source/blender/imbuf/intern/writeimage.c @@ -36,6 +36,7 @@ #include #endif +#include "BKE_global.h" #include "BLI_blenlib.h" #include "imbuf.h" @@ -54,6 +55,7 @@ #include "IMB_amiga.h" #include "IMB_png.h" #include "IMB_bmp.h" +#include "IMB_tiff.h" #include "IMB_radiance_hdr.h" #include "IMB_iff.h" @@ -87,6 +89,9 @@ short IMB_saveiff(struct ImBuf *ibuf,char *naam,int flags) if (IS_iris(ibuf)) { return imb_saveiris(ibuf,naam,flags); } + if (G.have_libtiff && IS_tiff(ibuf)) { + return imb_savetiff(ibuf,naam,flags); + } file = open(naam, O_BINARY | O_RDWR | O_CREAT | O_TRUNC, 0666); if (file < 0) return (FALSE); -- cgit v1.2.3