diff options
author | Kent Mein <mein@cs.umn.edu> | 2005-12-03 00:46:52 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2005-12-03 00:46:52 +0300 |
commit | 473983737782aba1728fba00c34204a3b09da2d3 (patch) | |
tree | 3c3ca7e4c00b9790151e7e0e131b82e57fca50c5 | |
parent | 9588cfdffe56a05a115f4d1664179f92ab779f18 (diff) |
fix for #3498
(Swap colors on bigendian machines)
I also made it so that the env variable is tried ahead of all
of the other looking. (That way you can override a system default
if its broken without having to upgrade)
This also makes it so we can remove the OSX ifdef. So I did.
lukep: If you still want it add it back in but my gut says the less ifdefs
we have the better ;)
Kent
-rw-r--r-- | source/blender/imbuf/intern/dynlibtiff.c | 9 | ||||
-rwxr-xr-x | source/blender/imbuf/intern/gen_dynlibtiff.py | 9 | ||||
-rw-r--r-- | source/blender/imbuf/intern/tiff.c | 4 |
3 files changed, 10 insertions, 12 deletions
diff --git a/source/blender/imbuf/intern/dynlibtiff.c b/source/blender/imbuf/intern/dynlibtiff.c index a770ee95547..cdcb995bcff 100644 --- a/source/blender/imbuf/intern/dynlibtiff.c +++ b/source/blender/imbuf/intern/dynlibtiff.c @@ -76,7 +76,9 @@ void libtiff_loadlibtiff(void) char *filename; libtiff = NULL; -#ifndef __APPLE__ /* no standard location of libtiff in MacOS X */ + filename = getenv("BF_TIFF_LIB"); + if (filename) libtiff = PIL_dynlib_open(filename); + if (libtiff != NULL) return; /* Try to find libtiff in a couple of standard places */ libtiff = PIL_dynlib_open("libtiff.so"); @@ -92,12 +94,7 @@ void libtiff_loadlibtiff(void) if (libtiff != NULL) return; /* For solaris */ libtiff = PIL_dynlib_open("/usr/openwin/lib/libtiff.so"); - if (libtiff != NULL) return; -#endif - - filename = getenv("BF_TIFF_LIB"); - if (filename) libtiff = PIL_dynlib_open(filename); } void *libtiff_findsymbol(char *name) diff --git a/source/blender/imbuf/intern/gen_dynlibtiff.py b/source/blender/imbuf/intern/gen_dynlibtiff.py index 02c7e6e856c..1ee0275854a 100755 --- a/source/blender/imbuf/intern/gen_dynlibtiff.py +++ b/source/blender/imbuf/intern/gen_dynlibtiff.py @@ -118,7 +118,9 @@ void libtiff_loadlibtiff(void) char *filename; libtiff = NULL; -#ifndef __APPLE__ /* no standard location of libtiff in MacOS X */ + filename = getenv("BF_TIFF_LIB"); + if (filename) libtiff = PIL_dynlib_open(filename); + if (libtiff != NULL) return; /* Try to find libtiff in a couple of standard places */ libtiff = PIL_dynlib_open("libtiff.so"); @@ -134,12 +136,7 @@ void libtiff_loadlibtiff(void) if (libtiff != NULL) return; /* For solaris */ libtiff = PIL_dynlib_open("/usr/openwin/lib/libtiff.so"); - if (libtiff != NULL) return; -#endif - - filename = getenv("BF_TIFF_LIB"); - if (filename) libtiff = PIL_dynlib_open(filename); } void *libtiff_findsymbol(char *name) diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index 361ae9d198f..5b86a2c2dfa 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -49,6 +49,8 @@ #include "imbuf.h" #include "imbuf_patch.h" +#include "BKE_global.h" + #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" @@ -393,6 +395,8 @@ struct ImBuf *imb_loadtiff(unsigned char *mem, int size, int flags) /* close the client layer interface to the in-memory file */ libtiff_TIFFClose(image); + if (G.order == B_ENDIAN) IMB_convert_rgba_to_abgr(ibuf->x*ibuf->y, ibuf->rect); + /* return successfully */ return (ibuf); } |