diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-01-24 00:08:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-01-24 00:08:01 +0300 |
commit | 55150edc925e7d74398f39d5bf46212200f53324 (patch) | |
tree | 76b6844a5e2bec11588147aa96e6651246e47e3d /source/blender/imbuf/intern/util.c | |
parent | 8a95c67a50918a928f45fffd53e084428fcff9d8 (diff) |
[#18164] jpeg2000 patch, with some fixes from Peter too.
Support for jpeg2000 and writing DCI Cinema standard files.
Notes
* 12 and 16bit channel depths are converted from/to blenders float buffer.
* Grayscale/RGB with alpha supported.
* Theres an option to save color channels as YCC rather then RGB.
* Quality 100 saves lossless
* The UI is a bit weired because of the DCI standards need to be given to the encoder.
Diffstat (limited to 'source/blender/imbuf/intern/util.c')
-rw-r--r-- | source/blender/imbuf/intern/util.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index cf8c0978c66..15d1d031dbd 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -68,6 +68,10 @@ #include "quicktime_import.h" #endif +#ifdef WITH_OPENJPEG +#include "IMB_jp2.h" +#endif + #ifdef WITH_FFMPEG #include <ffmpeg/avcodec.h> #include <ffmpeg/avformat.h> @@ -140,7 +144,11 @@ static int IMB_ispic_name(char *name) /* if (imb_is_a_bmp(buf)) return(BMP); */ - + +#ifdef WITH_OPENJPEG + if (imb_is_a_jp2(buf)) return(JP2); +#endif + #ifdef WITH_QUICKTIME #if defined(_WIN32) || defined(__APPLE__) if(G.have_quicktime) { @@ -191,6 +199,9 @@ int IMB_ispic(char *filename) #ifdef WITH_BF_OPENEXR || BLI_testextensie(filename, ".exr") #endif +#ifdef WITH_BF_OPENJPEG + || BLI_testextensie(filename, ".jp2") +#endif || BLI_testextensie(filename, ".sgi")) { return IMB_ispic_name(filename); } else { @@ -211,6 +222,9 @@ int IMB_ispic(char *filename) #ifdef WITH_BF_OPENEXR || BLI_testextensie(filename, ".exr") #endif +#ifdef WITH_BF_OPENJPEG + || BLI_testextensie(filename, ".jp2") +#endif || BLI_testextensie(filename, ".iff") || BLI_testextensie(filename, ".lbm") || BLI_testextensie(filename, ".sgi")) { |