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/writeimage.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/writeimage.c')
-rw-r--r--source/blender/imbuf/intern/writeimage.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c
index b3af727190a..f8452ac4cd4 100644
--- a/source/blender/imbuf/intern/writeimage.c
+++ b/source/blender/imbuf/intern/writeimage.c
@@ -51,14 +51,22 @@
#include "IMB_amiga.h"
#include "IMB_png.h"
#include "IMB_bmp.h"
-#include "IMB_tiff.h"
#include "IMB_radiance_hdr.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
+
#ifdef WITH_OPENEXR
#include "openexr/openexr_api.h"
#endif
+
#ifdef WITH_DDS
#include "dds/dds_api.h"
#endif
@@ -110,11 +118,21 @@ short IMB_saveiff(struct ImBuf *ibuf, char *name, int flags)
IMB_rect_from_float(ibuf);
return imb_saveiris(ibuf, name, flags);
}
+
+#if defined(__APPLE__) && defined(GHOST_COCOA)
+ if (IS_tiff(ibuf)) {
+ if(ibuf->rect==NULL && ibuf->rect_float)
+ IMB_rect_from_float(ibuf);
+ return imb_cocoaSaveImage(ibuf, name, flags);
+ }
+#else
if (G.have_libtiff && IS_tiff(ibuf)) {
if(ibuf->rect==NULL && ibuf->rect_float)
IMB_rect_from_float(ibuf);
return imb_savetiff(ibuf, name, flags);
}
+#endif
+
#ifdef WITH_OPENEXR
if (IS_openexr(ibuf)) {
return imb_save_openexr(ibuf, name, flags);