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:
authorTon Roosendaal <ton@blender.org>2006-03-12 17:11:23 +0300
committerTon Roosendaal <ton@blender.org>2006-03-12 17:11:23 +0300
commitde0262e4c81c7d7f036cc574f636a248f2cc9f27 (patch)
treeeb9548b7588eb22de2c409bc0ee127716827e94d /source/blender/imbuf/intern/writeimage.c
parentbd151b30ab70433c27027864db777a3955d0fc76 (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/writeimage.c')
-rw-r--r--source/blender/imbuf/intern/writeimage.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c
index ae75de8f54f..2e922c65827 100644
--- a/source/blender/imbuf/intern/writeimage.c
+++ b/source/blender/imbuf/intern/writeimage.c
@@ -47,6 +47,7 @@
#include "IMB_allocimbuf.h"
+#include "IMB_dpxcineon.h"
#include "IMB_targa.h"
#include "IMB_jpeg.h"
#include "IMB_iris.h"
@@ -114,7 +115,13 @@ short IMB_saveiff(struct ImBuf *ibuf, char *name, int flags)
return imb_save_openexr(ibuf, name, flags);
}
#endif
-
+ if (IS_cineon(ibuf)) {
+ return imb_savecineon(ibuf, name, flags);
+
+ }
+ if (IS_dpx(ibuf)) {
+ return imb_save_dpx(ibuf, name, flags);
+ }
file = open(name, O_BINARY | O_RDWR | O_CREAT | O_TRUNC, 0666);
if (file < 0) return (FALSE);