diff options
author | Matt Ebb <matt@mke3.net> | 2010-05-21 07:25:38 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-05-21 07:25:38 +0400 |
commit | 2be851c9665caab9e858f4c06ec59e7bb4201e17 (patch) | |
tree | b7c27c3ae46813520ffe9e84f13739243d3ced27 /source/blender/blenkernel/intern | |
parent | e8ed1f1f557bb469bfc277448d2ee833e4867086 (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/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index eb478eaddf5..5588c8df161 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -779,10 +779,12 @@ void BKE_add_image_extension(char *string, int imtype) if(!BLI_testextensie(string, ".bmp")) extension= ".bmp"; } - else if(G.have_libtiff && (imtype==R_TIFF)) { +#ifdef WITH_TIFF + else if(imtype==R_TIFF) { if(!BLI_testextensie(string, ".tif") && !BLI_testextensie(string, ".tiff")) extension= ".tif"; } +#endif #ifdef WITH_OPENEXR else if( ELEM(imtype, R_OPENEXR, R_MULTILAYER)) { if(!BLI_testextensie(string, ".exr")) @@ -1187,12 +1189,14 @@ int BKE_write_ibuf(Scene *scene, ImBuf *ibuf, char *name, int imtype, int subimt else if ((imtype==R_BMP)) { ibuf->ftype= BMP; } - else if ((G.have_libtiff) && (imtype==R_TIFF)) { +#ifdef WITH_TIFF + else if (imtype==R_TIFF) { ibuf->ftype= TIF; if(subimtype & R_TIFF_16BIT) ibuf->ftype |= TIF_16BIT; } +#endif #ifdef WITH_OPENEXR else if (imtype==R_OPENEXR || imtype==R_MULTILAYER) { ibuf->ftype= OPENEXR; |