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

Image I/O
[Image Package]


Classes

struct  Gan_CineonHeaderStruct
 Cineon image header structure. More...
struct  Gan_DPXGenericImageDataHeader
 Generic DPX image data header. More...
struct  Gan_DPXImageInfoHeader
 DPX image information header. More...
struct  Gan_DPXOrientationHeader
 DPX orientation header section structure. More...
struct  Gan_DPXFilmHeader
 DPX film Header section structure. More...
struct  Gan_DPXTVHeader
 DPX TV Header section structure. More...
struct  Gan_DPXHeaderStruct
 DPX Header structure. More...
struct  Gan_ImageReadControlStruct
 Input control structure. More...
struct  Gan_ImageHeaderInfo
 Format-specific header information. More...
struct  Gan_ImageHeaderStruct
 Input image header structure. More...
struct  Gan_ImageWriteControlStruct
 Output image control structure. More...
struct  my_error_mgr
struct  Gan_JPEGHeaderStruct
 JPEG header structure. More...
struct  Gan_MovieStruct
 Image sequence structure. More...
struct  Gan_PNGHeaderStruct
 Stuff read back from PNG header. More...
struct  Gan_SGIHeaderStruct
 SGI header structure. More...
struct  Gan_TargaHeaderStruct
 Targa header structure. More...
struct  Gan_TIFFHeaderStruct
 TIFF header structure. More...

Defines

#define OFFSET_MAGIC   0
#define OFFSET_IMAGEOFFSET   4
#define OFFSET_GENERICSIZE   8
#define OFFSET_INDUSTRYSIZE   12
#define OFFSET_VARIABLESIZE   16
#define OFFSET_FILESIZE   20
#define OFFSET_VERSION   24
#define OFFSET_FILENAME   32
#define OFFSET_CREATIONDATE   132
#define OFFSET_CREATIONTIME   144
#define OFFSET_RESERVED   156
#define OFFSET_ORIENTATION   192
#define OFFSET_NUMBEROFCHANNELS   193
#define OFFSET_DESIGNATORBYTE0   196
#define OFFSET_DESIGNATORBYTE1   197
#define OFFSET_BITSPERPIXEL   198
#define OFFSET_PIXELSPERLINE   200
#define OFFSET_LINESPERIMAGE   204
#define OFFSET_MINIMUMDATAVALUE   208
#define OFFSET_MINIMUMQUANTITYREPRESENTED   212
#define OFFSET_MAXIMUMDATAVALUE   216
#define OFFSET_MAXIMUMQUANTITYREPRESENTED   220
#define OFFSET_CHROMATICITY   420
#define OFFSET_DATAINTERLEAVE   680
#define OFFSET_PACKING   681
#define OFFSET_SIGNED   682
#define OFFSET_EOLPADDING   684
#define OFFSET_EOIMAGEPADDING   688
#define OFFSET_XINPUTDEVICEPITCH   972
#define OFFSET_YINPUTDEVICEPITCH   976
#define OFFSET_IMAGEGAMMA   980
#define BIG_BUFFER_SIZE   2048
#define CINEON_PACKING_TIGHTEST   0
#define CINEON_PACKING_BYTE_BOUNDARY_LEFT_JUSTIFIED   1
#define CINEON_PACKING_BYTE_BOUNDARY_RIGHT_JUSTIFIED   2
#define CINEON_PACKING_2BYTE_BOUNDARY_LEFT_JUSTIFIED   3
#define CINEON_PACKING_2BYTE_BOUNDARY_RIGHT_JUSTIFIED   4
#define CINEON_PACKING_4BYTE_BOUNDARY_LEFT_JUSTIFIED   5
#define CINEON_PACKING_4BYTE_BOUNDARY_RIGHT_JUSTIFIED   6
#define IMAGE_DATA_OFFSET   0x7e00
#define OFFSET_MAGIC   0
#define OFFSET_IMAGEOFFSET   4
#define OFFSET_VERSION   8
#define OFFSET_FILESIZE   16
#define OFFSET_DITTOKEY   20
#define OFFSET_GENERICSIZE   24
#define OFFSET_INDUSTRYSIZE   28
#define OFFSET_USERSIZE   32
#define OFFSET_FILENAME   36
#define OFFSET_CREATETIME   136
#define OFFSET_CREATOR   160
#define OFFSET_PROJECT   260
#define OFFSET_COPYRIGHT   460
#define OFFSET_ENCRYPTKEY   660
#define OFFSET_RESERVED   664
#define OFFSET_ORIENTATION   0
#define OFFSET_ORIENTATION   0
#define OFFSET_ELEMENTNUMBER   2
#define OFFSET_ELEMENTNUMBER   2
#define OFFSET_PIXELSPERLINE   4
#define OFFSET_PIXELSPERLINE   4
#define OFFSET_LINESPERIMAGEELE   8
#define OFFSET_LINESPERIMAGEELE   8
#define OFFSET_DATASIGN0   12
#define OFFSET_REFLOWDATA0   16
#define OFFSET_REFLOWQUANTITY0   20
#define OFFSET_REFHIGHDATA0   24
#define OFFSET_REFHIGHQUANTITY0   28
#define OFFSET_DESCRIPTOR0   32
#define OFFSET_TRANSFER0   33
#define OFFSET_COLORIMETRIC0   34
#define OFFSET_BITSIZE0   35
#define OFFSET_PACKING0   36
#define OFFSET_ENCODING0   38
#define OFFSET_DATAOFFSET0   40
#define OFFSET_EOLPADDING0   44
#define OFFSET_EOIMAGEPADDING0   48
#define OFFSET_DESCRIPTION0   52
#define OFFSET_ORIENTATION_XOFFSET   0
#define OFFSET_ORIENTATION_YOFFSET   4
#define OFFSET_ORIENTATION_XCENTRE   8
#define OFFSET_ORIENTATION_YCENTRE   12
#define OFFSET_ORIENTATION_XORIGSIZE   16
#define OFFSET_ORIENTATION_YORIGSIZE   20
#define OFFSET_ORIENTATION_FILENAME   24
#define OFFSET_ORIENTATION_FILENAME   24
#define OFFSET_ORIENTATION_CREATIONTIME   124
#define OFFSET_ORIENTATION_CREATIONTIME   124
#define OFFSET_ORIENTATION_INPUTDEV   148
#define OFFSET_ORIENTATION_INPUTDEV   148
#define OFFSET_ORIENTATION_INPUTSERIAL   180
#define OFFSET_ORIENTATION_INPUTSERIAL   180
#define OFFSET_ORIENTATION_BORDER   212
#define OFFSET_ORIENTATION_BORDER   212
#define OFFSET_ORIENTATION_PIXELASPECT   220
#define OFFSET_ORIENTATION_PIXELASPECT   220
#define OFFSET_FILM_MFGID   0
#define OFFSET_FILM_FILMTYPE   2
#define OFFSET_FILM_OFFSET   4
#define OFFSET_FILM_PREFIX   6
#define OFFSET_FILM_COUNT   12
#define OFFSET_FILM_FORMAT   16
#define OFFSET_FILM_FRAMEPOSITION   48
#define OFFSET_FILM_SEQUENCE_LEN   52
#define OFFSET_FILM_HELDCOUNT   56
#define OFFSET_FILM_FRAMERATE   60
#define OFFSET_FILM_SHUTTERANGLE   64
#define OFFSET_FILM_FRAMEID   68
#define OFFSET_FILM_SLATEINFO   100
#define OFFSET_TV_TIMECODE   0
#define OFFSET_TV_USERBITS   4
#define OFFSET_TV_INTERLACE   8
#define OFFSET_TV_FIELD_NUMBER   9
#define OFFSET_TV_VIDEO_SIGNAL   10
#define OFFSET_TV_HORZSAMPLERATE   12
#define OFFSET_TV_VERTSAMPLERATE   16
#define OFFSET_TV_FRAMERATE   20
#define OFFSET_TV_TIMEOFFSET   24
#define OFFSET_TV_GAMMA   28
#define OFFSET_TV_BLACKLEVEL   32
#define OFFSET_TV_BLACKGAIN   36
#define OFFSET_TV_BREAKPOINT   40
#define OFFSET_TV_WHITELEVEL   44
#define OFFSET_TV_INTEGRATIONTIME   48
#define BIG_BUFFER_SIZE   2048
#define DPX_PACKED   0
#define DPX_FILLED   1
#define IMAGE_DATA_OFFSET   8192
#define SGI_MAGIC_NUMBER_OFFSET   0
#define SGI_STORAGE_OFFSET   2
#define SGI_BPC_OFFSET   3
#define SGI_DIMENSION_OFFSET   4
#define SGI_XSIZE_OFFSET   6
#define SGI_YSIZE_OFFSET   8
#define SGI_ZSIZE_OFFSET   10
#define SGI_PIXMIN_OFFSET   12
#define SGI_PIXMAX_OFFSET   16
#define SGI_COLOURMAP_OFFSET   104
#define BIG_BUFFER_SIZE   530
#define TARGA_ID_LENGTH_OFFSET   0
#define TARGA_COLOURMAP_TYPE_OFFSET   1
#define TARGA_DATA_TYPE_OFFSET   2
#define TARGA_COLOURMAP_ORIGIN_OFFSET   3
#define TARGA_COLOURMAP_LENGTH_OFFSET   5
#define TARGA_COLOURMAP_ENTRYSIZE_OFFSET   7
#define TARGA_XORIGIN_OFFSET   8
#define TARGA_YORIGIN_OFFSET   10
#define TARGA_WIDTH_OFFSET   12
#define TARGA_HEIGHT_OFFSET   14
#define TARGA_PIXEL_SIZE_OFFSET   16
#define TARGA_IMAGE_DESCRIPTOR_OFFSET   17
#define TARGA_DATA_TYPE_MAPPED   1
#define TARGA_DATA_TYPE_RGB   2
#define TARGA_DATA_TYPE_RLE_MAPPED   9
#define TARGA_DATA_TYPE_RLE_RGB   10
#define BIG_BUFFER_SIZE   264

Typedefs

typedef Gan_CineonHeaderStruct Gan_CineonHeaderStruct
 Cineon image header structure.
typedef enum Gan_DPXTransferCharacteristic Gan_DPXTransferCharacteristic
 DPX Transfer characteristics.
typedef enum Gan_DPXColorimetricCharacteristics Gan_DPXColorimetricCharacteristics
 DPX Colorimetric characteristics.
typedef Gan_DPXGenericImageDataHeader Gan_DPXGenericImageDataHeader
 Generic DPX image data header.
typedef Gan_DPXImageInfoHeader Gan_DPXImageInfoHeader
 DPX image information header.
typedef Gan_DPXOrientationHeader Gan_DPXOrientationHeader
 DPX orientation header section structure.
typedef Gan_DPXFilmHeader Gan_DPXFilmHeader
 DPX film Header section structure.
typedef Gan_DPXTVHeader Gan_DPXTVHeader
 DPX TV Header section structure.
typedef Gan_DPXHeaderStruct Gan_DPXHeaderStruct
 DPX Header structure.
typedef Gan_ImageReadControlStruct Gan_ImageReadControlStruct
 Input control structure.
typedef Gan_ImageHeaderInfo Gan_ImageHeaderInfo
 Format-specific header information.
typedef Gan_ImageHeaderStruct Gan_ImageHeaderStruct
 Input image header structure.
typedef Gan_ImageWriteControlStruct Gan_ImageWriteControlStruct
 Output image control structure.
typedef my_error_mgr * my_error_ptr
typedef Gan_JPEGHeaderStruct Gan_JPEGHeaderStruct
 JPEG header structure.
typedef Gan_MovieStruct Gan_MovieStruct
 Image sequence structure.
typedef Gan_PNGHeaderStruct Gan_PNGHeaderStruct
 Stuff read back from PNG header.
typedef Gan_SGIHeaderStruct Gan_SGIHeaderStruct
 SGI header structure.
typedef Gan_TargaHeaderStruct Gan_TargaHeaderStruct
 Targa header structure.
typedef Gan_TIFFHeaderStruct Gan_TIFFHeaderStruct
 TIFF header structure.

Enumerations

enum  Gan_DPXTransferCharacteristic {
  GAN_DPXTRANSFER_USER_DEFINED = 0, GAN_DPXTRANSFER_PRINTING_DENSITY = 1, GAN_DPXTRANSFER_LINEAR = 2, GAN_DPXTRANSFER_LOGARITHMIC = 3,
  GAN_DPXTRANSFER_UNSPECIFIED_VIDEO = 4, GAN_DPXTRANSFER_SMPTE240M = 5, GAN_DPXTRANSFER_CCIR709_1 = 6, GAN_DPXTRANSFER_CCIR601_2BG = 7,
  GAN_DPXTRANSFER_CCIR601_2M = 8, GAN_DPXTRANSFER_NTSC = 9, GAN_DPXTRANSFER_PAL = 10, GAN_DPXTRANSFER_ZLINEAR = 11,
  GAN_DPXTRANSFER_ZHOMOGENEOUS = 12, GAN_DPXTRANSFER_DEFAULT
}
 DPX Transfer characteristics.
enum  Gan_DPXColorimetricCharacteristics {
  GAN_DPXCOLORIMETRIC_USER_DEFINED = 0, GAN_DPXCOLORIMETRIC_PRINTING_DENSITY = 1, GAN_DPXCOLORIMETRIC_UNSPECIFIED_VIDEO = 4, GAN_DPXCOLORIMETRIC_SMPTE240M = 5,
  GAN_DPXCOLORIMETRIC_CCIR709_1 = 6, GAN_DPXCOLORIMETRIC_CCIR601_2BG = 7, GAN_DPXCOLORIMETRIC_CCIR601_2M = 8, GAN_DPXCOLORIMETRIC_NTSC = 9,
  GAN_DPXCOLORIMETRIC_PAL = 10, GAN_DPXCOLORIMETRIC_DEFAULT
}
 DPX Colorimetric characteristics.
enum  Gan_ImageFileFormat {
  GAN_PNG_FORMAT, GAN_PBM_FORMAT, GAN_PGM_FORMAT, GAN_PPM_FORMAT,
  GAN_TIFF_FORMAT, GAN_JPEG_FORMAT, GAN_DPX_FORMAT, GAN_CINEON_FORMAT,
  GAN_SGI_FORMAT, GAN_TARGA_FORMAT, GAN_UNKNOWN_FORMAT
}
 Image file formats supported by Gandalf. More...

Functions

Gan_Bool gan_image_is_cineon (const unsigned char *magic_string, size_t length)
 Determines whether an image is a Cineon image using the magic number.
Gan_Imagegan_read_cineon_image_stream (FILE *infile, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a RGB colour image file in Cineon format from a stream.
Gan_Imagegan_read_cineon_image (const char *filename, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a RGB colour image file in Cineon format.
void gan_initialise_cineon_header_struct (Gan_CineonHeaderStruct *octrlstr, Gan_ImageFormat image_format, Gan_Type type)
 Initialises the header structure for Cineon files.
Gan_Bool gan_write_cineon_image_stream (FILE *outfile, const Gan_Image *image, Gan_Bool new_file, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a RGB colour image to a file stream in Cineon format.
Gan_Bool gan_write_cineon_image (const char *filename, const Gan_Image *image, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a RGB colour image file in Cineon format.
void vReverseEndianness32 (gan_uint32 *pui32Val)
 Reverse the bytes in a 32-bit word.
void vReverseEndianness16 (gan_uint16 *pui16Val)
 Reverse the bytes in a 16-bit word.
gan_uint32 ui32ReverseEndianness (gan_uint32 ui32Val)
 Reverse the bytes in a 32-bit word, returning the new value.
gan_uint16 ui16ReverseEndianness (gan_uint16 ui16Val)
 Reverse the bytes in a 16-bit word, returning the new value.
void vReverseEndiannessArray16 (gan_uint16 *aui16Val, unsigned int uiNumberOfVals)
 Reverse the bytes in an array of 16-bit words.
void vReverseEndiannessArray32 (gan_uint32 *aui32Val, unsigned int uiNumberOfVals)
 Reverse the bytes in an array of 32-bit words.
Gan_ImagepgiRead8BitDPXImageData (FILE *pfInFile, gan_uint32 ui32eolPadding, gan_uint32 ui32eoImagePadding, Gan_ImageFormat eFormat, Gan_Type eType, gan_uint32 ui32PixelsPerLine, gan_uint32 ui32LinesPerImageEle, Gan_Image *pgiImage, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_ImagepgiRead10BitDPXImageData (FILE *pfInFile, Gan_Bool bReversedEndianness, Gan_Bool bPacked, gan_uint32 ui32eolPadding, gan_uint32 ui32eoImagePadding, Gan_ImageFormat eFormat, Gan_Type eType, gan_uint32 ui32PixelsPerLine, gan_uint32 ui32LinesPerImageEle, Gan_Image *pgiImage, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_ImagepgiRead12BitDPXImageData (FILE *pfInFile, Gan_Bool bReversedEndianness, Gan_Bool bPacked, gan_uint32 ui32eolPadding, gan_uint32 ui32eoImagePadding, Gan_ImageFormat eFormat, Gan_Type eType, gan_uint32 ui32PixelsPerLine, gan_uint32 ui32LinesPerImageEle, Gan_Image *pgiImage, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_ImagepgiRead16BitDPXImageData (FILE *pfInFile, Gan_Bool bReversedEndianness, gan_uint32 ui32eolPadding, gan_uint32 ui32eoImagePadding, Gan_ImageFormat eFormat, Gan_Type eType, gan_uint32 ui32PixelsPerLine, gan_uint32 ui32LinesPerImageEle, Gan_Image *pgiImage, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_ImagepgiRead32BitFloatDPXImageData (FILE *pfInFile, Gan_Bool bReversedEndianness, gan_uint32 ui32eolPadding, gan_uint32 ui32eoImagePadding, Gan_ImageFormat eFormat, Gan_Type eType, gan_uint32 ui32PixelsPerLine, gan_uint32 ui32LinesPerImageEle, Gan_Image *pgiImage, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_Bool gan_image_is_dpx (const unsigned char *magic_string, size_t length)
 Determines whether an image is a DPX image using the magic number.
Gan_Imagegan_read_dpx_image_stream (FILE *infile, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a RGB colour image file in DPX format from a stream.
Gan_Imagegan_read_dpx_image (const char *filename, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a RGB colour image file in DPX format.
void gan_initialise_dpx_header_struct (Gan_DPXHeaderStruct *octrlstr, Gan_ImageFormat image_format, Gan_Type type)
 Initialises the header structure for DPX files.
gan_uint32 ui32DPXFileSize (unsigned int uiImageDataOffset, Gan_ImageFormat eFormat, gan_uint8 ui8BitSize, Gan_Bool bPacked, unsigned int uiHeight, unsigned int uiWidth, gan_uint32 *pui32eolPadding)
 Not a user function.
Gan_Bool bWrite8BitDPXImageData (FILE *pfOutFile, const Gan_Image *pgiImage, Gan_Bool bNewFile, unsigned int uieolPadding, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_Bool bWrite10BitDPXImageData (FILE *pfOutFile, const Gan_Image *pgiImage, Gan_Bool bNewFile, Gan_Bool bReverseBytes, unsigned int uieolPadding, Gan_Bool bPacked, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_Bool bWrite12BitDPXImageData (FILE *pfOutFile, const Gan_Image *pgiImage, Gan_Bool bNewFile, Gan_Bool bReverseBytes, unsigned int uieolPadding, Gan_Bool bPacked, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_Bool bWrite16BitDPXImageData (FILE *pfOutFile, const Gan_Image *pgiImage, Gan_Bool bNewFile, Gan_Bool bReverseBytes, unsigned int uieolPadding, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_Bool bWrite32BitFloatDPXImageData (FILE *pfOutFile, const Gan_Image *pgiImage, Gan_Bool bNewFile, Gan_Bool bReverseBytes, unsigned int uieolPadding, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_Bool gan_write_dpx_image_stream (FILE *outfile, const Gan_Image *image, Gan_Bool new_file, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a RGB colour image to a file stream in DPX format.
Gan_Bool gan_write_dpx_image (const char *filename, const Gan_Image *image, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a RGB colour image file in DPX format.
void gan_initialise_image_read_control_struct (Gan_ImageReadControlStruct *ictrlstr)
 Initialise structure controlling image reading with default parameters.
Gan_ImageFileFormat gan_image_determine_file_format_stream (FILE *infile)
 Determine the file format of the given image file.
Gan_ImageFileFormat gan_image_determine_file_format (const char *filename)
 Determine the file format of the given image file.
Gan_ImageFileFormat gan_image_interpret_format_string (const char *format_string)
 Interprets a string as an image file format.
Gan_Bool gan_image_format_type_supported (Gan_ImageFileFormat file_format, Gan_ImageFormat image_format, Gan_Type type, const Gan_ImageHeaderInfo *info)
 Determines whether the given data format is supported by the given file format.
Gan_Bool gan_image_write_field_supported (Gan_ImageFileFormat file_format)
 Determines whether the given data format supports writing a single field.
const char * gan_image_file_format_string (Gan_ImageFileFormat format)
 Generates a string identifier for an image file format.
Gan_Bool gan_image_file_format_compressed (Gan_ImageFileFormat format)
 Returns boolean value indicating whether the given file format is compressed.
Gan_Imagegan_image_read_stream (FILE *infile, Gan_ImageFileFormat file_format, Gan_Image *image, const Gan_ImageReadControlStruct *ictrlstr, Gan_ImageHeaderStruct *header)
 Reads an image file from a file stream.
Gan_Imagegan_image_read (const char *filename, Gan_ImageFileFormat file_format, Gan_Image *image, const Gan_ImageReadControlStruct *ictrlstr, Gan_ImageHeaderStruct *header)
 Reads an image file.
Gan_Bool gan_initialise_image_header_info (Gan_ImageHeaderInfo *hdrinfo, Gan_ImageFormat image_format, Gan_Type type)
 Initialise image header structure.
Gan_Bool gan_initialise_image_write_control_struct (Gan_ImageWriteControlStruct *octrlstr, Gan_ImageFileFormat file_format, Gan_ImageFormat image_format, Gan_Type type)
 Initialise structure controlling image writing with default parameters.
Gan_Bool gan_image_write_stream (FILE *outfile, Gan_ImageFileFormat file_format, const Gan_Image *image, Gan_Bool new_file, const Gan_ImageWriteControlStruct *octrlstr)
 Writes an image file to a file stream.
Gan_Bool gan_image_write (const char *filename, Gan_ImageFileFormat file_format, const Gan_Image *image, const Gan_ImageWriteControlStruct *octrlstr)
 Writes an image file.
const char * gan_image_format_string (Gan_ImageFormat format)
 Generates a string identifier for an internal image format.
 my_error_exit (j_common_ptr cinfo)
Gan_Bool gan_image_is_jpeg (const unsigned char *magic_string, size_t length)
 Determines whether an image is a JPEG image using the magic number.
Gan_Imagegan_read_jpeg_image_stream (FILE *infile, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads an image file in JPEG format from a file stream.
Gan_Imagegan_read_jpeg_image (const char *filename, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads an image file in JPEG format.
void gan_initialise_jpeg_header_struct (Gan_JPEGHeaderStruct *octrlstr)
 Initialises the write control structure for JPEG files.
Gan_Bool gan_write_jpeg_image_stream (FILE *outfile, const Gan_Image *image, Gan_Bool new_file, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes an image file to a stream in JPEG format.
Gan_Bool gan_write_jpeg_image (const char *filename, const Gan_Image *image, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes an image file in JPEG format.
Gan_MovieStructgan_movie_new (const char *directory, const char *basename, int no_digits, const char *suffix, int first, int no_images, Gan_ImageFileFormat file_format)
 Create new movie structure for image sequence I/O.
void gan_movie_set_step (Gan_MovieStruct *movie, int step)
 Sets step attribute of movie structure.
void gan_movie_set_crop_window (Gan_MovieStruct *movie, int crop_xlow, int crop_xhigh, int crop_ylow, int crop_yhigh)
 Sets crop window attribute of movie structure.
void gan_movie_free (Gan_MovieStruct *movie)
 Frees a movie structure.
char * gan_movie_image_name (Gan_MovieStruct *movie, int number, char *string, unsigned slen)
 Builds the full name of an image in a movie.
Gan_Imagegan_movie_image_read (Gan_MovieStruct *movie, int number, Gan_Image *image)
 Reads an image from an image sequence.
Gan_Bool gan_movie_image_write (Gan_MovieStruct *movie, int number, Gan_Image *image)
 Writes an image to an image sequence.
Gan_Bool gan_image_is_pbm (const unsigned char *magic_string, size_t length)
 Determines whether an image is a PBM image using the magic number.
Gan_Imagegan_read_pbm_image_stream (FILE *infile, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a binary image file in PBM format from a stream.
Gan_Imagegan_read_pbm_image (const char *filename, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a binary image file in PBM format.
Gan_Bool gan_write_pbm_image_stream (FILE *outfile, const Gan_Image *image, Gan_Bool new_file, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a binary image to a file stream in PBM format.
Gan_Bool gan_write_pbm_image (const char *filename, const Gan_Image *image, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a grey level image file in PBM format.
Gan_Bool gan_image_is_pgm (const unsigned char *magic_string, size_t length)
 Determines whether an image is a PGM image using the magic number.
Gan_Imagegan_read_pgm_image_stream (FILE *infile, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a grey level image file in PGM format from a stream.
Gan_Imagegan_read_pgm_image (const char *filename, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a grey level image file in PGM format.
Gan_Bool gan_write_pgm_image_stream (FILE *outfile, const Gan_Image *image, Gan_Bool new_file, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a grey level image to a file stream in PGM format.
Gan_Bool gan_write_pgm_image (const char *filename, const Gan_Image *image, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a grey level image file in PGM format.
Gan_Bool gan_image_is_png (const unsigned char *magic_string, size_t length)
 Determines whether an image is a PNG image using the magic number.
Gan_Imagegan_read_png_image_stream (FILE *infile, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads an image file in PNG format from a file stream.
Gan_Imagegan_read_png_image (const char *filename, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads an image file in PNG format.
void gan_initialise_png_header_struct (Gan_PNGHeaderStruct *octrlstr)
 Initialises the write control structure for PNG files.
Gan_Bool gan_write_png_image_stream (FILE *outfile, const Gan_Image *image, Gan_Bool new_file, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes an image file to a stream in PNG format.
Gan_Bool gan_write_png_image (const char *filename, const Gan_Image *image, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes an image file in PNG format.
Gan_Bool gan_image_is_ppm (const unsigned char *magic_string, size_t length)
 Determines whether an image is a PPM image using the magic number.
Gan_Imagegan_read_ppm_image_stream (FILE *infile, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a RGB colour image file in PPM format from a stream.
Gan_Imagegan_read_ppm_image (const char *filename, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a RGB colour image file in PPM format.
Gan_Bool gan_write_ppm_image_stream (FILE *outfile, const Gan_Image *image, Gan_Bool new_file, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a RGB colour image to a file stream in PPM format.
Gan_Bool gan_write_ppm_image (const char *filename, const Gan_Image *image, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a RGB colour image file in PPM format.
Gan_Bool gan_image_is_sgi (const unsigned char *magic_string, size_t length)
 Determines whether an image is a SGI image using the magic number.
Gan_Imagegan_read_sgi_image_stream (FILE *infile, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a RGB colour image file in SGI format from a stream.
Gan_Imagegan_read_sgi_image (const char *filename, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a RGB colour image file in SGI format.
void gan_initialise_sgi_header_struct (Gan_SGIHeaderStruct *octrlstr)
 Initialises the output control structure for SGI files.
Gan_Bool gan_write_sgi_image_stream (FILE *outfile, const Gan_Image *image, Gan_Bool new_file, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a RGB colour image to a file stream in SGI format.
Gan_Bool gan_write_sgi_image (const char *filename, const Gan_Image *image, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a RGB colour image file in SGI format.
Gan_Bool gan_image_is_targa (const unsigned char *magic_string, size_t length)
 Determines whether an image is a TARGA image using the magic number.
Gan_Imagegan_read_targa_image_stream (FILE *infile, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a RGB colour image file in TARGA format from a stream.
Gan_Imagegan_read_targa_image (const char *filename, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a RGB colour image file in TARGA format.
void gan_initialise_targa_header_struct (Gan_TargaHeaderStruct *octrlstr)
 Initialises the output control structure for Targa files.
Gan_Bool gan_write_targa_image_stream (FILE *outfile, const Gan_Image *image, Gan_Bool new_file, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a RGB colour image to a file stream in TARGA format.
Gan_Bool gan_write_targa_image (const char *filename, const Gan_Image *image, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a RGB colour image file in TARGA format.
Gan_Bool gan_image_is_tiff (const unsigned char *magic_string, size_t length)
 Determines whether an image is a TIFF image using the magic number.
Gan_Imagegan_read_tiff_image (const char *filename, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads an image file in TIFF format.
void gan_initialise_tiff_header_struct (Gan_TIFFHeaderStruct *octrlstr)
 Initialises the write control structure for TIFF files.
Gan_Bool gan_write_tiff_image_stream (FILE *outfile, const Gan_Image *image, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes an image file to a stream in TIFF format.
Gan_Bool gan_write_tiff_image (const char *filename, const Gan_Image *image, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes an image file in TIFF format.

Enumeration Type Documentation

enum Gan_ImageFileFormat
 

Image file formats supported by Gandalf.

Enumeration values:
GAN_PNG_FORMAT  PNG image format
GAN_PBM_FORMAT  Portable bitmap image format
GAN_PGM_FORMAT  Portable greymap image format
GAN_PPM_FORMAT  Portable pixmap image format
GAN_TIFF_FORMAT  TIFF image format
GAN_JPEG_FORMAT  JPEG image format
GAN_DPX_FORMAT  DPX image format
GAN_CINEON_FORMAT  CINEON image format
GAN_SGI_FORMAT  SGI image format
GAN_TARGA_FORMAT  TrueVision TARGA image format
GAN_UNKNOWN_FORMAT  Unknown Image Format


Function Documentation

Gan_Bool gan_image_file_format_compressed Gan_ImageFileFormat  format  ) 
 

Returns boolean value indicating whether the given file format is compressed.

Parameters:
format Image file format, e.g. GAN_PNG_FORMAT
Returns:
GAN_TRUE is the format is a compressed format, GAN_FALSE if uncompressed

const char * gan_image_file_format_string Gan_ImageFileFormat  format  ) 
 

Generates a string identifier for an image file format.

Parameters:
format Image file format, e.g. GAN_PNG_FORMAT
Returns:
String identifier, e.g. "PNG", or "" for unknown format.

const char * gan_image_format_string Gan_ImageFormat  format  ) 
 

Generates a string identifier for an internal image format.

Parameters:
format Image format, e.g. GAN_RGB_COLOUR_IMAGE
Returns:
String identifier, e.g. "RGB colour", or "" for unknown format.

Gan_ImageFileFormat gan_image_interpret_format_string const char *  format_string  ) 
 

Interprets a string as an image file format.

Parameters:
format_string File format string, e.g. "png"
Returns:
GAN_UNKNOWN_FORMAT on failure to interpret string, or else va successfully interpreted file format, e.g. GAN_PNG_FORMAT.
Attempts to interpret the given string format_string as a file name suffix or other identifying string for a specific image format known by Gandalf, which is returned.

Gan_Image * gan_image_read const char *  filename,
Gan_ImageFileFormat  file_format,
Gan_Image image,
const Gan_ImageReadControlStruct ictrlstr,
Gan_ImageHeaderStruct header
 

Reads an image file.

Parameters:
filename The name of the image file
file_format The format of the file, e.g. GAN_PNG_FORMAT
image The image structure to read the image data into or NULL
ictrlstr Structure controlling read or NULL
header Output information structure containing format-dependent header data, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads an image from the given file filename into the provided image structure. If image is NULL a new image is dynamically allocated; otherwise the already allocated image structure is reused.

If the file format is known, it should be specified in file_format; otherwise pass file_format as GAN_UNKNOWN_FORMAT and the function will try to determine the file format.

See also:
gan_write_image().

Gan_Image * gan_image_read_stream FILE *  infile,
Gan_ImageFileFormat  file_format,
Gan_Image image,
const Gan_ImageReadControlStruct ictrlstr,
Gan_ImageHeaderStruct header
 

Reads an image file from a file stream.

Parameters:
infile Input file stream
file_format Image file format, e.g. GAN_PNG_FORMAT, or GAN_UNKNOWN_FORMAT
image The image structure to read the image data into or NULL
ictrlstr Structure controlling read or NULL
header Output information structure containing format-dependent header data, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads an image from the given file stream infile into the provided image structure. If image is NULL a new image is dynamically allocated; otherwise the already allocated image structure is reused.

If the file format is known, it should be specified by file_format; otherwise pass file_format as GAN_UNKNOWN_FORMAT and the function will try to determine the file format.

See also:
gan_write_image_stream().

Gan_Bool gan_image_write const char *  filename,
Gan_ImageFileFormat  file_format,
const Gan_Image image,
const Gan_ImageWriteControlStruct octrlstr
 

Writes an image file.

Parameters:
filename The name of the image file
file_format The format of the file, e.g. GAN_PNG_FORMAT
image The image structure to be written to the file
octrlstr Format-dependent control structure
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes an image from the provided image structure into the given file.

The given file format file_format should support the format and type of the image; otherwise an error is reported and GAN_FALSE is returned. If you want the format to be determined from the file name suffix, pass GAN_UNKNOWN_FORMAT.

See also:
gan_read_image().

Gan_Bool gan_image_write_stream FILE *  outfile,
Gan_ImageFileFormat  file_format,
const Gan_Image image,
Gan_Bool  new_file,
const Gan_ImageWriteControlStruct octrlstr
 

Writes an image file to a file stream.

Parameters:
outfile Output file stream
file_format The format of the file, e.g. GAN_PNG_FORMAT, or GAN_UNKNOWN_FORMAT
image The image structure to be written to the file
new_file Whether the file does not currently exist
octrlstr Format-dependent control structure
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes an image from the provided image structure into the given file stream.

The given file format file_format should support the format and type of the image; otherwise an error is reported and GAN_FALSE is returned.

See also:
gan_read_image().

void gan_initialise_cineon_header_struct Gan_CineonHeaderStruct octrlstr,
Gan_ImageFormat  image_format,
Gan_Type  type
 

Initialises the header structure for Cineon files.

This function should be called on the structure to set the parameters to default values. Then set any non-default values yourself before calling gan_write_cineon_image() or gan_write_cineon_image_stream().

void gan_initialise_dpx_header_struct Gan_DPXHeaderStruct octrlstr,
Gan_ImageFormat  image_format,
Gan_Type  type
 

Initialises the header structure for DPX files.

This function should be called on the structure to set the parameters to default values. Then set any non-default values yourself before calling gan_write_dpx_image() or gan_write_dpx_image_stream().

Gan_Bool gan_initialise_image_header_info Gan_ImageHeaderInfo ohdrinfo,
Gan_ImageFormat  image_format,
Gan_Type  type
 

Initialise image header structure.

Parameters:
image_format Image pixel format, e.g. GAN_GREY_LEVEL_IMAGE
type Image pixel type, e.g. GAN_UCHAR
Returns:
GAN_FALSE on error, GAN_TRUE otherwise

Gan_Bool gan_initialise_image_write_control_struct Gan_ImageWriteControlStruct octrlstr,
Gan_ImageFileFormat  file_format,
Gan_ImageFormat  image_format,
Gan_Type  type
 

Initialise structure controlling image writing with default parameters.

Parameters:
octrlstr Pointer to structure to be filled with default values
file_format File format that will be used to write the image

void gan_initialise_jpeg_header_struct Gan_JPEGHeaderStruct octrlstr  ) 
 

Initialises the write control structure for JPEG files.

This function should be called on the structure to set the parameters to default values. Then set any non-default values yourself before calling gan_write_jpeg_image() or gan_write_jpeg_image_stream().

void gan_initialise_png_header_struct Gan_PNGHeaderStruct octrlstr  ) 
 

Initialises the write control structure for PNG files.

This function should be called on the structure to set the parameters to default values. Then set any non-default values yourself before calling gan_write_png_image() or gan_write_png_image_stream().

void gan_initialise_sgi_header_struct Gan_SGIHeaderStruct octrlstr  ) 
 

Initialises the output control structure for SGI files.

This function should be called on the structure to set the parameters to default values. Then set any non-default values yourself before calling gan_write_sgi_image() or gan_write_sgi_image_stream().

void gan_initialise_targa_header_struct Gan_TargaHeaderStruct octrlstr  ) 
 

Initialises the output control structure for Targa files.

This function should be called on the structure to set the parameters to default values. Then set any non-default values yourself before calling gan_write_targa_image() or gan_write_targa_image_stream().

void gan_initialise_tiff_header_struct Gan_TIFFHeaderStruct octrlstr  ) 
 

Initialises the write control structure for TIFF files.

This function should be called on the structure to set the parameters to default values. Then set any non-default values yourself before calling gan_write_tiff_image() or gan_write_tiff_image_stream().

void gan_movie_free Gan_MovieStruct movie  ) 
 

Frees a movie structure.

Parameters:
movie Pointer to the movie structure to free
Returns:
No value.
Frees a structure containing the specification of an image sequence.

See also:
gan_movie_new().

char * gan_movie_image_name Gan_MovieStruct movie,
int  number,
char *  string,
unsigned  slen
 

Builds the full name of an image in a movie.

Parameters:
movie Pointer to a movie structure
number The number of the image in the sequence
string A string to be filled with the file name or NULL
slen The length of the provided string (zero if string is NULL)
Returns:
The filled file name as a string, or NULL on failure.
Builds and returns the full name of a specific image in a movie. If string is NULL, the string is malloc()'d and returned; otherwise the provided string is filled and returned. If the string is not long enough, NULL is returned.

slen defines the maximum length of the string, including the null terminator character, i.e. the total size of the string array.

See also:
gan_movie_image_read().

Gan_Image * gan_movie_image_read Gan_MovieStruct movie,
int  number,
Gan_Image image
 

Reads an image from an image sequence.

Parameters:
movie Pointer to a movie structure
number The number of the image in the sequence
image The image structure to read the image data into or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads a specific image file from an image movie into the provided image structure. If image is NULL a new image is dynamically allocated; otherwise the already allocated image structure is reused.

See also:
gan_movie_image_write().

Gan_Bool gan_movie_image_write Gan_MovieStruct movie,
int  number,
Gan_Image image
 

Writes an image to an image sequence.

Parameters:
movie Pointer to a movie structure
number The number of the image in the sequence
image The image structure to write to the file
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes an image structure into a specific image file from an image sequence.

See also:
gan_movie_image_read().

Gan_MovieStruct * gan_movie_new const char *  directory,
const char *  basename,
int  no_digits,
const char *  suffix,
int  first,
int  no_images,
Gan_ImageFileFormat  file_format
 

Create new movie structure for image sequence I/O.

Parameters:
directory The directory in which the image sequence is stored
basename The base name of the sequence
no_digits Number of digits in number field of file name
suffix String at end of each file name
first Number of first file in the sequence
no_images Number of images in the sequence
file_format File format of the image files
Returns:
Pointer to successfully created structure, or NULL on failure.
Builds and returns a pointer to a new structure containing the specification of an image sequence.

See also:
gan_movie_free().

void gan_movie_set_crop_window Gan_MovieStruct movie,
int  crop_left,
int  crop_right,
int  crop_top,
int  crop_bottom
 

Sets crop window attribute of movie structure.

Parameters:
movie Pointer to movie structure
crop_xlow Low x-value of crop region
crop_xhigh High x-value of crop region
crop_ylow Low y-value of crop region
crop_yhigh High y-value of crop region
Returns:
No value.
Sets crop window attribute of movie structure created by gan_movie_new().

See also:
gan_movie_new().

void gan_movie_set_step Gan_MovieStruct movie,
int  step
 

Sets step attribute of movie structure.

Parameters:
movie Pointer to movie structure
step Change in number between each frame of the sequence
Returns:
No value.
Sets step attribute of movie structure created by gan_movie_new(), i.e. the number change between adjacent frames in the sequence. The default is one.

See also:
gan_movie_new().

Gan_Image * gan_read_cineon_image const char *  filename,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads a RGB colour image file in Cineon format.

Parameters:
filename The name of the image file
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the Cineon image with the in the file filename into the given image. If image is NULL a new image is dynamically allocated; otherwise the already allocated image structure is reused.

See also:
gan_write_cineon_image().

Gan_Image * gan_read_cineon_image_stream FILE *  infile,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads a RGB colour image file in Cineon format from a stream.

Parameters:
infile The file stream to be read
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the Cineon image from the given file stream infile into the given image. If image is NULL a new image is dynamically allocated, otherwise the already allocated image structure is reused.

See also:
gan_write_cineon_image_stream().

Gan_Image * gan_read_dpx_image const char *  filename,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads a RGB colour image file in DPX format.

Parameters:
filename The name of the image file
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the DPX image with the in the file filename into the given image. If image is NULL a new image is dynamically allocated; otherwise the already allocated image structure is reused.

See also:
gan_write_dpx_image().

Gan_Image * gan_read_dpx_image_stream FILE *  infile,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads a RGB colour image file in DPX format from a stream.

Parameters:
infile The file stream to be read
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the DPX image from the given file stream infile into the given image. If image is NULL a new image is dynamically allocated, otherwise the already allocated image structure is reused.

See also:
gan_write_dpx_image_stream().

Gan_Image * gan_read_jpeg_image const char *  filename,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads an image file in JPEG format.

Parameters:
filename The name of the image file
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the JPEG image stored in the file filename into the given image. If image is NULL a new image is dynamically allocated; otherwise the already allocated image structure is reused.

See also:
gan_write_jpeg_image().

Gan_Image * gan_read_jpeg_image_stream FILE *  infile,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads an image file in JPEG format from a file stream.

Parameters:
infile The file stream to be read
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the JPEG image from the file stream infile into the given image. If image is passed as NULL a new image is dynamically allocated; otherwise the already allocated image structure is reused.

See also:
gan_write_jpeg_image_stream().

Gan_Image * gan_read_pbm_image const char *  filename,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads a binary image file in PBM format.

Parameters:
filename The name of the image file
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the PBM image with the in the file filename into the given image. If image is NULL a new image is dynamically allocated; otherwise the already allocated image structure is reused.

See also:
gan_write_pbm_image().

Gan_Image * gan_read_pbm_image_stream FILE *  infile,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads a binary image file in PBM format from a stream.

Parameters:
infile The file stream to be read
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the PBM image from the given file stream infile into the given image. If image is NULL a new image is dynamically allocated, otherwise the already allocated image structure is reused.

See also:
gan_write_pbm_image_stream().

Gan_Image * gan_read_pgm_image const char *  filename,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads a grey level image file in PGM format.

Parameters:
filename The name of the image file
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the PGM image with the in the file filename into the given image. If image is NULL a new image is dynamically allocated; otherwise the already allocated image structure is reused.

See also:
gan_write_pgm_image().

Gan_Image * gan_read_pgm_image_stream FILE *  infile,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads a grey level image file in PGM format from a stream.

Parameters:
infile The file stream to be read
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the PGM image from the given file stream infile into the given image. If image is NULL a new image is dynamically allocated, otherwise the already allocated image structure is reused.

See also:
gan_write_pgm_image_stream().

Gan_Image * gan_read_png_image const char *  filename,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads an image file in PNG format.

Parameters:
filename The name of the image file
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the PNG image stored in the file filename into the given image. If image is passed as NULL a new image is dynamically allocated; otherwise the already allocated image structure is reused. gam identifies the gamma correction which the opened image should have. It should be one if no gamma correction needs to be applied.

See also:
gan_write_png_image().

Gan_Image * gan_read_png_image_stream FILE *  infile,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads an image file in PNG format from a file stream.

Parameters:
infile The file stream to be read
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the PNG image from the file stream infile into the given image. If image is NULL a new image is dynamically allocated, otherwise the already allocated image structure is reused. gam identifies the gamma correction which the opened image should have. It should be one if no gamma correction needs to be applied.

See also:
gan_write_png_image_stream().

Gan_Image * gan_read_ppm_image const char *  filename,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads a RGB colour image file in PPM format.

Parameters:
filename The name of the image file
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the PPM image with the in the file filename into the given image. If image is NULL a new image is dynamically allocated; otherwise the already allocated image structure is reused.

See also:
gan_write_ppm_image().

Gan_Image * gan_read_ppm_image_stream FILE *  infile,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads a RGB colour image file in PPM format from a stream.

Parameters:
infile The file stream to be read
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the PPM image from the given file stream infile into the given image. If image is NULL a new image is dynamically allocated, otherwise the already allocated image structure is reused.

See also:
gan_write_ppm_image_stream().

Gan_Image * gan_read_sgi_image const char *  filename,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads a RGB colour image file in SGI format.

Parameters:
filename The name of the image file
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the SGI image with the in the file filename into the given image. If image is NULL a new image is dynamically allocated; otherwise the already allocated image structure is reused.

See also:
gan_write_sgi_image().

Gan_Image * gan_read_sgi_image_stream FILE *  infile,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads a RGB colour image file in SGI format from a stream.

Parameters:
infile The file stream to be read
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the SGI image from the given file stream infile into the given image. If image is NULL a new image is dynamically allocated, otherwise the already allocated image structure is reused.

See also:
gan_write_sgi_image_stream().

Gan_Image * gan_read_targa_image const char *  filename,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads a RGB colour image file in TARGA format.

Parameters:
filename The name of the image file
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the TARGA image with the in the file filename into the given image. If image is NULL a new image is dynamically allocated; otherwise the already allocated image structure is reused.

See also:
gan_write_targa_image().

Gan_Image * gan_read_targa_image_stream FILE *  infile,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads a RGB colour image file in TARGA format from a stream.

Parameters:
infile The file stream to be read
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads the TARGA image from the given file stream infile into the given image. If image is NULL a new image is dynamically allocated, otherwise the already allocated image structure is reused.

See also:
gan_write_targa_image_stream().

Gan_Image * gan_read_tiff_image const char *  filename,
Gan_Image image,
const struct Gan_ImageReadControlStruct ictrlstr,
struct Gan_ImageHeaderStruct header
 

Reads an image file in TIFF format.

Parameters:
filename The name of the image file
image The image structure to read the image data into or NULL
ictrlstr Pointer to structure controlling TIFF input or NULL
header Pointer to file header structure to be filled, or NULL
Returns:
Pointer to image structure, or NULL on ailure.
Reads the TIFF image stored in the file filename into an image. If image is NULL a new image is dynamically allocated, otherwise the already allocated image structure is reused.

See also:
gan_write_tiff_image().

Gan_Bool gan_write_cineon_image const char *  filename,
const Gan_Image image,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes a RGB colour image file in Cineon format.

Parameters:
filename The name of the image file
image The image structure to write to the file
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes the image into Cineon file filename.

See also:
gan_read_cineon_image().

Gan_Bool gan_write_cineon_image_stream FILE *  outfile,
const Gan_Image image,
Gan_Bool  new_file,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes a RGB colour image to a file stream in Cineon format.

Parameters:
outfile The file stream
image The image structure to write to the file
new_file Whether the file does not currently exist
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, or GAN_FALSE on failure.
Writes the image into the file stream outfile in Cineon format.

See also:
gan_read_cineon_image_stream().

Gan_Bool gan_write_dpx_image const char *  filename,
const Gan_Image image,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes a RGB colour image file in DPX format.

Parameters:
filename The name of the image file
image The image structure to write to the file
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes the image into DPX file filename.

See also:
gan_read_dpx_image().

Gan_Bool gan_write_dpx_image_stream FILE *  outfile,
const Gan_Image image,
Gan_Bool  new_file,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes a RGB colour image to a file stream in DPX format.

Parameters:
outfile The file stream
image The image structure to write to the file
new_file Whether the file does not currently exist
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, or GAN_FALSE on failure.
Writes the image into the file stream outfile in DPX format.

See also:
gan_read_dpx_image_stream().

Gan_Bool gan_write_jpeg_image const char *  filename,
const Gan_Image image,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes an image file in JPEG format.

Parameters:
filename The name of the image file
image The image structure to write to the file
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes the given image into the JPEG file filename.

See also:
gan_read_jpeg_image().

Gan_Bool gan_write_jpeg_image_stream FILE *  outfile,
const Gan_Image image,
Gan_Bool  new_file,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes an image file to a stream in JPEG format.

Parameters:
outfile The file stream
image The image structure to write to the file
new_file Whether the file does not currently exist
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes the given image into a JPEG file using a file stream outfile.

See also:
gan_read_jpeg_image_stream().

Gan_Bool gan_write_pbm_image const char *  filename,
const Gan_Image image,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes a grey level image file in PBM format.

Parameters:
filename The name of the image file
image The image structure to write to the file
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes the image into PBM file filename.

See also:
gan_read_pbm_image().

Gan_Bool gan_write_pbm_image_stream FILE *  outfile,
const Gan_Image image,
Gan_Bool  new_file,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes a binary image to a file stream in PBM format.

Parameters:
outfile The file stream
image The image structure to write to the file
new_file Whether the file does not currently exist
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, or GAN_FALSE on failure.
Writes the image into the file stream outfile in PBM format.

See also:
gan_read_pbm_image_stream().

Gan_Bool gan_write_pgm_image const char *  filename,
const Gan_Image image,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes a grey level image file in PGM format.

Parameters:
filename The name of the image file
image The image structure to write to the file
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes the image into PGM file filename.

See also:
gan_read_pgm_image().

Gan_Bool gan_write_pgm_image_stream FILE *  outfile,
const Gan_Image image,
Gan_Bool  new_file,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes a grey level image to a file stream in PGM format.

Parameters:
outfile The file stream
image The image structure to write to the file
new_file Whether the file does not currently exist
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, or GAN_FALSE on failure.
Writes the image into the file stream outfile in PGM format.

See also:
gan_read_pgm_image_stream().

Gan_Bool gan_write_png_image const char *  filename,
const Gan_Image image,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes an image file in PNG format.

Parameters:
filename The name of the image file
image The image structure to write to the file
octrlstr Pointer to structure controlling PNG output or NULL
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes the given image into PNG file filename. If gam is not one gamma correction of gam is applied.

See also:
gan_read_png_image().

Gan_Bool gan_write_png_image_stream FILE *  outfile,
const Gan_Image image,
Gan_Bool  new_file,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes an image file to a stream in PNG format.

Parameters:
outfile The file stream
image The image structure to write to the file
new_file Whether the file does not currently exist
octrlstr Pointer to structure controlling PNG output or NULL
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes the given image into a PNG file using a file stream outfile. If gam is not one a gamma correction of gam is applied.

Gan_Bool gan_write_ppm_image const char *  filename,
const Gan_Image image,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes a RGB colour image file in PPM format.

Parameters:
filename The name of the image file
image The image structure to write to the file
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes the image into PPM file filename.

See also:
gan_read_ppm_image().

Gan_Bool gan_write_ppm_image_stream FILE *  outfile,
const Gan_Image image,
Gan_Bool  new_file,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes a RGB colour image to a file stream in PPM format.

Parameters:
outfile The file stream
image The image structure to write to the file
new_file Whether the file does not currently exist
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, or GAN_FALSE on failure.
Writes the image into the file stream outfile in PPM format.

See also:
gan_read_ppm_image_stream().

Gan_Bool gan_write_sgi_image const char *  filename,
const Gan_Image image,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes a RGB colour image file in SGI format.

Parameters:
filename The name of the image file
image The image structure to write to the file
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes the image into SGI file filename.

See also:
gan_read_sgi_image().

Gan_Bool gan_write_sgi_image_stream FILE *  outfile,
const Gan_Image image,
Gan_Bool  new_file,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes a RGB colour image to a file stream in SGI format.

Parameters:
outfile The file stream
image The image structure to write to the file
new_file Whether the file does not currently exist
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, or GAN_FALSE on failure.
Writes the image into the file stream outfile in SGI format.

See also:
gan_read_sgi_image_stream().

Gan_Bool gan_write_targa_image const char *  filename,
const Gan_Image image,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes a RGB colour image file in TARGA format.

Parameters:
filename The name of the image file
image The image structure to write to the file
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes the image into TARGA file filename.

See also:
gan_read_targa_image().

Gan_Bool gan_write_targa_image_stream FILE *  outfile,
const Gan_Image image,
Gan_Bool  new_file,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes a RGB colour image to a file stream in TARGA format.

Parameters:
outfile The file stream
image The image structure to write to the file
new_file Whether the file does not currently exist
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, or GAN_FALSE on failure.
Writes the image into the file stream outfile in TARGA format.

If single-field mode is specified in the control structure, and the file already existed the file stream must have been opened read-write.

See also:
gan_read_targa_image_stream().

Gan_Bool gan_write_tiff_image const char *  filename,
const Gan_Image image,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes an image file in TIFF format.

Parameters:
filename The name of the image file
image The image structure to write to the file
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes the image into a TIFF file filename.

See also:
gan_read_tiff_image().

Gan_Bool gan_write_tiff_image_stream FILE *  outfile,
const Gan_Image image,
const struct Gan_ImageWriteControlStruct octrlstr
 

Writes an image file to a stream in TIFF format.

Parameters:
outfile The file stream
image The image structure to write to the file
octrlstr Pointer to structure controlling output or NULL
Returns:
GAN_TRUE on successful write operation, or GAN_FALSE on failure.
Writes the image into a TIFF file using a file stream outfile. Uses the basic function TIFFReadRGBAImage(), so currently assumes an unsigned character RGBA image.

See also:
gan_read_tiff_image_stream().


Generated on Fri Mar 17 12:45:02 2006 by  doxygen 1.3.9.1