diff options
author | Ton Roosendaal <ton@blender.org> | 2006-03-12 17:11:23 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-03-12 17:11:23 +0300 |
commit | de0262e4c81c7d7f036cc574f636a248f2cc9f27 (patch) | |
tree | eb9548b7588eb22de2c409bc0ee127716827e94d /source/blender/imbuf/intern/util.c | |
parent | bd151b30ab70433c27027864db777a3955d0fc76 (diff) |
New: Import/Export of Cineon and DPX image files. The first is Kodak's
standard for film scanning, 10 bits/channel and logarithmic. DPX is
derived from Cineon as the ANSI/SMPTE industry standard.
DPX supports 16 bits color/channel, linear as well as logarithmic.
Code has been gratefully copied from CinePaint and was integrated in
Blender by Joe Eagar.
According to CinePaint's dev Robin Rowe the DPX code defaults to log
colorspace. Can't find in the code clues yet how to enable/disable that.
However, tests with write/read of DPX seems to show no visible loss by
log conversion code. Might be because it uses the entire 16 bit range...
CinePaint dpx files have been succesfully imported in a Quantel IQ HD/2K
finishing/grading set without problem, so for now I guess we can
use it! :)
Changes in code: added tests for image magic numbers before entering
the actual reading code. Prevents error prints, and makes it faster too.
(Note; this because Blender doesn't check for extensions, but calls
reading functions on every file until one accepts it. :)
Diffstat (limited to 'source/blender/imbuf/intern/util.c')
-rw-r--r-- | source/blender/imbuf/intern/util.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 56a03f56ce2..d741665f6ea 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -47,6 +47,7 @@ #include "IMB_bmp.h" #include "IMB_tiff.h" #include "IMB_radiance_hdr.h" +#include "IMB_dpxcineon.h" #include "IMB_anim.h" @@ -117,7 +118,8 @@ static int IMB_ispic_name(char *name) if (imb_is_a_openexr((uchar *)buf)) return(OPENEXR); #endif if (imb_is_a_tiff(buf)) return(TIF); - + if (imb_is_dpx(buf)) return (DPX); + if (imb_is_cineon(buf)) return(CINEON); /* radhdr: check if hdr format */ if (imb_is_a_hdr(buf)) return(RADHDR); @@ -168,6 +170,7 @@ int IMB_ispic(char *filename) || BLI_testextensie(filename, ".pict") || BLI_testextensie(filename, ".pntg") //macpaint || BLI_testextensie(filename, ".qtif") + || BLI_testextensie(filename, ".cin") || BLI_testextensie(filename, ".sgi")) { return IMB_ispic_name(filename); } else { @@ -181,6 +184,7 @@ int IMB_ispic(char *filename) || BLI_testextensie(filename, ".rgb") || BLI_testextensie(filename, ".bmp") || BLI_testextensie(filename, ".png") + || BLI_testextensie(filename, ".cin") || BLI_testextensie(filename, ".iff") || BLI_testextensie(filename, ".lbm") || BLI_testextensie(filename, ".sgi")) { |