Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Plisson <damien.plisson@yahoo.fr>2009-10-29 21:06:49 +0300
committerDamien Plisson <damien.plisson@yahoo.fr>2009-10-29 21:06:49 +0300
commitb1a832a7e2f2574d4f11a5aad0caf97318142ac7 (patch)
treec410e19f270ec9ffcd2b8205f55dbc60470e4c1e /source/blender/imbuf/intern/readimage.c
parentf5d62d885be1b040a3060fd3846ad2c08a05ad99 (diff)
Mac / COCOA : Imbuf
- replace libtiff by calls to Cocoa services to load/save tiff files (Libtiff, dynamically linked is not distributed with OS X, and would have had to be shipped for all four architectures) The imb_cocoaLoadImage & imb_cocoaSaveImage are generic towards the bitmap format, and thus can handle TIFF, GIF, JPG, JP2000, BMP and raw camera formats (read-only for these), even if today only TIFF is used as the other formats are already handled. - CMake updated - scons updated (Thx to Jens Verwiebe)
Diffstat (limited to 'source/blender/imbuf/intern/readimage.c')
-rw-r--r--source/blender/imbuf/intern/readimage.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c
index 4104a8db65c..5003127dfb6 100644
--- a/source/blender/imbuf/intern/readimage.c
+++ b/source/blender/imbuf/intern/readimage.c
@@ -53,11 +53,16 @@
#include "IMB_hamx.h"
#include "IMB_jpeg.h"
#include "IMB_bmp.h"
-#include "IMB_tiff.h"
#include "IMB_radiance_hdr.h"
#include "IMB_dpxcineon.h"
#include "BKE_global.h"
+#if defined(__APPLE__) && defined(GHOST_COCOA)
+#include "IMB_cocoa.h"
+#else
+#include "IMB_tiff.h"
+#endif
+
#ifdef WITH_OPENJPEG
#include "IMB_jp2.h"
#endif
@@ -152,11 +157,19 @@ 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)
+ ibuf = imb_cocoaLoadImage((uchar *)mem, size, flags);
+ if(ibuf) {
+ ibuf->ftype = TIF;
+ return ibuf;
+ }
+#else
if (G.have_libtiff) {
ibuf = imb_loadtiff((uchar *)mem, size, flags);
if (ibuf) return(ibuf);
}
-
+#endif
+
ibuf = imb_loadhdr((uchar*)mem, size, flags);
if (ibuf) return (ibuf);