Main Page | Modules | Class List | Directories | File List | Class Members | File Members

dpx_io.h

Go to the documentation of this file.
00001 
00014 /* This library is free software; you can redistribute it and/or
00015    modify it under the terms of the GNU Lesser General Public
00016    License as published by the Free Software Foundation; either
00017    version 2.1 of the License, or (at your option) any later version.
00018 
00019    This library is distributed in the hope that it will be useful,
00020    but WITHOUT ANY WARRANTY; without even the implied warranty of
00021    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022    Lesser General Public License for more details.
00023 
00024    You should have received a copy of the GNU Lesser General Public
00025    License along with this library; if not, write to the Free Software
00026    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027 */
00028 
00029 #ifndef _GAN_IMAGE_DPX_IO_H
00030 #define _GAN_IMAGE_DPX_IO_H
00031 
00032 #include <stdio.h>
00033 #include <gandalf/common/misc_defs.h>
00034 #include <gandalf/image/image_defs.h>
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00043 typedef enum Gan_DPXTransferCharacteristic
00044 {
00045     GAN_DPXTRANSFER_USER_DEFINED      =  0,
00046     GAN_DPXTRANSFER_PRINTING_DENSITY  =  1,
00047     GAN_DPXTRANSFER_LINEAR            =  2,
00048     GAN_DPXTRANSFER_LOGARITHMIC       =  3,
00049     GAN_DPXTRANSFER_UNSPECIFIED_VIDEO =  4,
00050     GAN_DPXTRANSFER_SMPTE240M         =  5,
00051     GAN_DPXTRANSFER_CCIR709_1         =  6,
00052     GAN_DPXTRANSFER_CCIR601_2BG       =  7,
00053     GAN_DPXTRANSFER_CCIR601_2M        =  8,
00054     GAN_DPXTRANSFER_NTSC              =  9,
00055     GAN_DPXTRANSFER_PAL               = 10,
00056     GAN_DPXTRANSFER_ZLINEAR           = 11,
00057     GAN_DPXTRANSFER_ZHOMOGENEOUS      = 12,
00058     GAN_DPXTRANSFER_DEFAULT
00059 } Gan_DPXTransferCharacteristic;
00060 
00061 typedef enum Gan_DPXColorimetricCharacteristics
00062 {
00063     GAN_DPXCOLORIMETRIC_USER_DEFINED      =  0,
00064     GAN_DPXCOLORIMETRIC_PRINTING_DENSITY  =  1,
00065     GAN_DPXCOLORIMETRIC_UNSPECIFIED_VIDEO =  4,
00066     GAN_DPXCOLORIMETRIC_SMPTE240M         =  5,
00067     GAN_DPXCOLORIMETRIC_CCIR709_1         =  6,
00068     GAN_DPXCOLORIMETRIC_CCIR601_2BG       =  7,
00069     GAN_DPXCOLORIMETRIC_CCIR601_2M        =  8,
00070     GAN_DPXCOLORIMETRIC_NTSC              =  9,
00071     GAN_DPXCOLORIMETRIC_PAL               = 10,
00072     GAN_DPXCOLORIMETRIC_DEFAULT
00073 } Gan_DPXColorimetricCharacteristics;
00074 
00078 typedef struct Gan_DPXWriteControlStruct
00079 {
00081    unsigned int bit_size;
00082 
00084    Gan_DPXTransferCharacteristic transfer;
00085 
00087    Gan_DPXColorimetricCharacteristics colorimetric;
00088 } Gan_DPXWriteControlStruct;
00089 
00090 /* functions exported so that Cineon I/O can use them */
00091 void vReverseEndiannessUI32(gan_uint32* pui32Val);
00092 void vReverseEndiannessUI16(gan_uint16* pui16Val);
00093 Gan_Image *pgiRead8BitDPXImageData(FILE* pfInFile, Gan_Bool bReversedEndianness, gan_uint16 ui16Packing,
00094                                    gan_uint32 ui32eolPadding, gan_uint32 ui32eoImagePadding,
00095                                    Gan_ImageFormat eFormat, Gan_Type eType,
00096                                    gan_uint32 ui32PixelsPerLine, gan_uint32 ui32LinesPerImageEle,
00097                                    Gan_Image* pgiImage);
00098 Gan_Image *pgiRead10BitDPXImageData(FILE* pfInFile, Gan_Bool bReversedEndianness, gan_uint16 ui16bPacked,
00099                                     gan_uint32 ui32eolPadding, gan_uint32 ui32eoImagePadding,
00100                                     Gan_ImageFormat eFormat, Gan_Type eType,
00101                                     gan_uint32 ui32PixelsPerLine, gan_uint32 ui32LinesPerImageEle,
00102                                     Gan_Image* pgiImage);
00103 Gan_Bool bWrite8BitDPXImageData(FILE* pfOutFile, Gan_Image* pgiImage, Gan_Bool bReverseBytes);
00104 Gan_Bool bWrite10BitDPXImageData(FILE* pfOutFile, Gan_Image* pgiImage, Gan_Bool bReverseBytes);
00105 
00106 /* Prototypes for public functions in dpx_io.c */
00107 void gan_initialise_dpx_write_control_struct(Gan_DPXWriteControlStruct *controlstr);
00108 Gan_Image *gan_read_dpx_image_stream ( FILE *infile, Gan_Image *image );
00109 Gan_Image *gan_read_dpx_image ( const char *filename, Gan_Image *image );
00110 Gan_Bool   gan_write_dpx_image_stream ( FILE *outfile, Gan_Image *image, Gan_DPXWriteControlStruct *controlstr );
00111 Gan_Bool   gan_write_dpx_image ( const char *filename, Gan_Image *image, Gan_DPXWriteControlStruct *controlstr );
00112 
00113 #ifdef __cplusplus
00114 }
00115 #endif
00116 
00117 #endif /* #ifndef _GAN_IMAGE_DPX_IO_H */

Generated on Sat May 21 23:52:47 2005 by  doxygen 1.4.3