diff options
author | Damien Plisson <damien.plisson@yahoo.fr> | 2009-11-02 14:20:31 +0300 |
---|---|---|
committer | Damien Plisson <damien.plisson@yahoo.fr> | 2009-11-02 14:20:31 +0300 |
commit | 3b43a5228e37e8cb79063474295a951c423497b3 (patch) | |
tree | 42c4ef998bf36a442d3848a4e0c45909376da45e /source/blender/imbuf/intern | |
parent | da1765765baf3bc84059548a43beec0c3a1c2d41 (diff) |
Mac / COCOA :
- revert tiff load/save to use standard libtiff (to ensure 100% colorimetry & alpha interpretation across platforms)
- include patch #18720 to fix load of libtiff dynlib (if present on system)
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/dynlibtiff.c | 30 | ||||
-rw-r--r-- | source/blender/imbuf/intern/readimage.c | 4 | ||||
-rw-r--r-- | source/blender/imbuf/intern/writeimage.c | 4 |
3 files changed, 33 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/dynlibtiff.c b/source/blender/imbuf/intern/dynlibtiff.c index b9186e482c5..6db83b37c05 100644 --- a/source/blender/imbuf/intern/dynlibtiff.c +++ b/source/blender/imbuf/intern/dynlibtiff.c @@ -78,6 +78,34 @@ void libtiff_loadlibtiff(void) if (libtiff != NULL) return; /* Try to find libtiff in a couple of standard places */ +#ifdef __APPLE__ + /* OSX has version specific library */ + //standard install location + libtiff = PIL_dynlib_open("/usr/local/lib/libtiff.dylib"); + if (libtiff != NULL) return; + libtiff = PIL_dynlib_open("/usr/local/lib/libtiff.3.dylib"); + if (libtiff != NULL) return; + //inside the blender app package contents/resources + libtiff = PIL_dynlib_open("@executable_path/../resources/libtiff.dylib"); + if (libtiff != NULL) return; + libtiff = PIL_dynlib_open("@executable_path/../resources/libtiff.3.dylib"); + if (libtiff != NULL) return; + //inside the blender app package contents/frameworks + libtiff = PIL_dynlib_open("@executable_path/../frameworks/libtiff.dylib"); + if (libtiff != NULL) return; + libtiff = PIL_dynlib_open("@executable_path/../frameworks/libtiff.3.dylib"); + if (libtiff != NULL) return; + //along side the blender app package + libtiff = PIL_dynlib_open("@executable_path/../../../libtiff.dylib"); + if (libtiff != NULL) return; + libtiff = PIL_dynlib_open("@executable_path/../../../libtiff.3.dylib"); + if (libtiff != NULL) return; + //inside the blender app package contents/MacOS + libtiff = PIL_dynlib_open("@executable_path/libtiff.dylib"); + if (libtiff != NULL) return; + libtiff = PIL_dynlib_open("@executable_path/libtiff.3.dylib"); + if (libtiff != NULL) return; +#else libtiff = PIL_dynlib_open("libtiff.so"); if (libtiff != NULL) return; libtiff = PIL_dynlib_open("libtiff.so.3"); @@ -88,7 +116,6 @@ void libtiff_loadlibtiff(void) if (libtiff != NULL) return; libtiff = PIL_dynlib_open("/usr/lib/libtiff.so.3"); if (libtiff != NULL) return; - /* OSX has version specific library */ #ifdef __x86_64__ libtiff = PIL_dynlib_open("/usr/lib64/libtiff.so.3"); if (libtiff != NULL) return; @@ -97,6 +124,7 @@ void libtiff_loadlibtiff(void) if (libtiff != NULL) return; /* For solaris */ libtiff = PIL_dynlib_open("/usr/openwin/lib/libtiff.so"); +#endif } diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c index 5003127dfb6..f248e6bb6c4 100644 --- a/source/blender/imbuf/intern/readimage.c +++ b/source/blender/imbuf/intern/readimage.c @@ -57,7 +57,7 @@ #include "IMB_dpxcineon.h" #include "BKE_global.h" -#if defined(__APPLE__) && defined(GHOST_COCOA) +#if defined(__APPLE__) && defined(IMBUF_COCOA) #include "IMB_cocoa.h" #else #include "IMB_tiff.h" @@ -157,7 +157,7 @@ ImBuf *IMB_ibImageFromMemory(int *mem, int size, int flags) { ibuf = imb_loadcineon((uchar *)mem, size, flags); if (ibuf) return(ibuf); -#if defined(__APPLE__) && defined(GHOST_COCOA) +#if defined(__APPLE__) && defined(IMBUF_COCOA) ibuf = imb_cocoaLoadImage((uchar *)mem, size, flags); if(ibuf) { ibuf->ftype = TIF; diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c index f8452ac4cd4..06ce59cddec 100644 --- a/source/blender/imbuf/intern/writeimage.c +++ b/source/blender/imbuf/intern/writeimage.c @@ -53,7 +53,7 @@ #include "IMB_bmp.h" #include "IMB_radiance_hdr.h" -#if defined(__APPLE__) && defined(GHOST_COCOA) +#if defined(__APPLE__) && defined(IMBUF_COCOA) #include "IMB_cocoa.h" #else #include "IMB_tiff.h" @@ -119,7 +119,7 @@ short IMB_saveiff(struct ImBuf *ibuf, char *name, int flags) return imb_saveiris(ibuf, name, flags); } -#if defined(__APPLE__) && defined(GHOST_COCOA) +#if defined(__APPLE__) && defined(IMBUF_COCOA) if (IS_tiff(ibuf)) { if(ibuf->rect==NULL && ibuf->rect_float) IMB_rect_from_float(ibuf); |