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:
authorMatt Ebb <matt@mke3.net>2010-05-21 07:25:38 +0400
committerMatt Ebb <matt@mke3.net>2010-05-21 07:25:38 +0400
commit2be851c9665caab9e858f4c06ec59e7bb4201e17 (patch)
treeb7c27c3ae46813520ffe9e84f13739243d3ced27 /source/blender/imbuf/intern/filetype.c
parente8ed1f1f557bb469bfc277448d2ee833e4867086 (diff)
Blender TIFF support
* Removed dynamic linking libTIFF code and change it to static linking (built into the blender executable). Dynamic linking made things a fair bit more complicated and wasn't working at all before on OS X - the dylib didn't exist and wasn't being copied. Since TIFF is more heavily depended upon now in Blender, it makes sense to make it less 'optional' and more in line with other libraries. I've updated both CMake and scons, and CMake on OS X/64bit works fine. It's now up to other platform/build system maintainers to enable this for their respective platforms (Campbell will check it for linux). For windows, and non-64bit osx, we need static libtiff libraries in /lib. I've added options WITH_TIFF for CMake and WITH_BF_TIFF for scons, so if blender won't build because of this, you should be able to disable these options until your build system has been updated. * Bonus feature: while doing this, I added support for loading 16bit and 32bit per channel TIFFs - they get converted to Blender's float buffers. Handy for zbrush displacement maps!
Diffstat (limited to 'source/blender/imbuf/intern/filetype.c')
-rw-r--r--source/blender/imbuf/intern/filetype.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/filetype.c b/source/blender/imbuf/intern/filetype.c
index 4a491ceba22..a0ff4476556 100644
--- a/source/blender/imbuf/intern/filetype.c
+++ b/source/blender/imbuf/intern/filetype.c
@@ -65,10 +65,10 @@ ImFileType IMB_FILE_TYPES[]= {
{NULL, NULL, imb_is_a_targa, imb_ftype_default, imb_loadtarga, imb_savetarga, NULL, 0, TGA},
{NULL, NULL, imb_is_dpx, imb_ftype_default, imb_loaddpx, imb_save_dpx, NULL, IM_FTYPE_FLOAT, DPX},
{NULL, NULL, imb_is_cineon, imb_ftype_default, imb_loadcineon, imb_savecineon, NULL, IM_FTYPE_FLOAT, CINEON},
-#if defined(__APPLE__) && defined(IMBUF_COCOA)
+#ifdef WITH_TIFF
+ {NULL, NULL, imb_is_a_tiff, imb_ftype_default, imb_loadtiff, imb_savetiff, imb_loadtiletiff, 0, TIF},
+#elif defined(__APPLE__) && defined(IMBUF_COCOA)
{NULL, NULL, imb_is_a_cocoa, imb_ftype_cocoa, imb_imb_cocoaLoadImage, imb_savecocoa, NULL, 0, TIF},
-#else
- {libtiff_init, libtiff_exit, imb_is_a_tiff, imb_ftype_default, imb_loadtiff, imb_savetiff, imb_loadtiletiff, 0, TIF},
#endif
{NULL, NULL, imb_is_a_hdr, imb_ftype_default, imb_loadhdr, imb_savehdr, NULL, IM_FTYPE_FLOAT, RADHDR},
#ifdef WITH_OPENEXR