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

Image I/O
[Image Package]


Classes

struct  my_error_mgr
struct  Gan_MovieStruct
 Image sequence 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 IMAGE_DATA_OFFSET   0x7e00
#define REVERSE_BYTES_IN_WRITE
#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_TIMEDATE   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_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 BIG_BUFFER_SIZE   2048
#define IMAGE_DATA_OFFSET   8192

Typedefs

typedef my_error_mgr * my_error_ptr
typedef Gan_MovieStruct Gan_MovieStruct
 Image sequence structure.

Enumerations

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_UNKNOWN_FORMAT
}
 Image file formats supported by Gandalf. More...

Functions

Gan_Imagegan_read_cineon_image_stream (FILE *infile, Gan_Image *image)
 Reads a RGB colour image file in CINEON format from a stream.
Gan_Imagegan_read_cineon_image (const char *filename, Gan_Image *image)
 Reads a RGB colour image file in CINEON format.
void gan_initialise_cineon_write_control_struct (Gan_CineonWriteControlStruct *controlstr)
 Initialises the write control structure for Cineon files.
Gan_Bool gan_write_cineon_image_stream (FILE *outfile, Gan_Image *image, Gan_CineonWriteControlStruct *controlstr)
 Writes a RGB colour image to a file stream in CINEON format.
Gan_Bool gan_write_cineon_image (const char *filename, Gan_Image *image, Gan_CineonWriteControlStruct *controlstr)
 Writes a RGB colour image file in CINEON format.
void vReverseEndiannessUI32 (gan_uint32 *pui32Val)
void vReverseEndiannessUI16 (gan_uint16 *pui16Val)
Gan_ImagepgiRead8BitDPXImageData (FILE *pfInFile, Gan_Bool bReversedEndianness, gan_uint16 ui16Packing, gan_uint32 ui32eolPadding, gan_uint32 ui32eoImagePadding, Gan_ImageFormat eFormat, Gan_Type eType, gan_uint32 ui32PixelsPerLine, gan_uint32 ui32LinesPerImageEle, Gan_Image *pgiImage)
Gan_ImagepgiRead10BitDPXImageData (FILE *pfInFile, Gan_Bool bReversedEndianness, gan_uint16 ui16bPacked, gan_uint32 ui32eolPadding, gan_uint32 ui32eoImagePadding, Gan_ImageFormat eFormat, Gan_Type eType, gan_uint32 ui32PixelsPerLine, gan_uint32 ui32LinesPerImageEle, Gan_Image *pgiImage)
Gan_Imagegan_read_dpx_image_stream (FILE *infile, Gan_Image *image)
 Reads a RGB colour image file in DPX format from a stream.
Gan_Imagegan_read_dpx_image (const char *filename, Gan_Image *image)
 Reads a RGB colour image file in DPX format.
void gan_initialise_dpx_write_control_struct (Gan_DPXWriteControlStruct *controlstr)
 Initialises the write control structure for DPX files.
Gan_Bool bWrite8BitDPXImageData (FILE *pfOutFile, Gan_Image *pgiImage, Gan_Bool bReverseBytes)
Gan_Bool bWrite10BitDPXImageData (FILE *pfOutFile, Gan_Image *pgiImage, Gan_Bool bReverseBytes)
Gan_Bool gan_write_dpx_image_stream (FILE *outfile, Gan_Image *image, Gan_DPXWriteControlStruct *controlstr)
 Writes a RGB colour image to a file stream in DPX format.
Gan_Bool gan_write_dpx_image (const char *filename, Gan_Image *image, Gan_DPXWriteControlStruct *controlstr)
 Writes a RGB colour image file in DPX format.
Gan_ImageFileFormat gan_image_interpret_format_string (const char *format_string)
 Interprets a string as an image file format.
Gan_Imagegan_image_read_stream (FILE *infile, Gan_ImageFileFormat file_format, Gan_Image *image)
 Reads an image file from a file stream.
Gan_Imagegan_image_read (const char *filename, Gan_ImageFileFormat file_format, Gan_Image *image)
 Reads an image file.
Gan_Bool gan_image_write_stream (FILE *outfile, Gan_ImageFileFormat file_format, Gan_Image *image)
 Writes an image file to a file stream.
Gan_Bool gan_image_write (const char *filename, Gan_ImageFileFormat file_format, Gan_Image *image)
 Writes an image file.
 my_error_exit (j_common_ptr cinfo)
Gan_Imagegan_read_jpeg_image_stream (FILE *infile, Gan_Image *image)
 Reads an image file in JPEG format from a file stream.
Gan_Imagegan_read_jpeg_image (const char *filename, Gan_Image *image)
 Reads an image file in JPEG format.
Gan_Bool gan_write_jpeg_image_stream (FILE *outfile, Gan_Image *image, int quality)
 Writes an image file to a stream in JPEG format.
Gan_Bool gan_write_jpeg_image (const char *filename, Gan_Image *image, int quality)
 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_Imagegan_read_pbm_image_stream (FILE *infile, Gan_Image *image)
 Reads a binary image file in PBM format from a stream.
Gan_Imagegan_read_pbm_image (const char *filename, Gan_Image *image)
 Reads a binary image file in PBM format.
Gan_Bool gan_write_pbm_image_stream (FILE *outfile, Gan_Image *image)
 Writes a binary image to a file stream in PBM format.
Gan_Bool gan_write_pbm_image (const char *filename, Gan_Image *image)
 Writes a grey level image file in PBM format.
Gan_Imagegan_read_pgm_image_stream (FILE *infile, Gan_Image *image)
 Reads a grey level image file in PGM format from a stream.
Gan_Imagegan_read_pgm_image (const char *filename, Gan_Image *image)
 Reads a grey level image file in PGM format.
Gan_Bool gan_write_pgm_image_stream (FILE *outfile, Gan_Image *image)
 Writes a grey level image to a file stream in PGM format.
Gan_Bool gan_write_pgm_image (const char *filename, Gan_Image *image)
 Writes a grey level image file in PGM format.
Gan_Imagegan_read_png_image_stream (FILE *infile, Gan_Image *image, double gam)
 Reads an image file in PNG format from a file stream.
Gan_Imagegan_read_png_image (const char *filename, Gan_Image *image, double gam)
 Reads an image file in PNG format.
Gan_Bool gan_write_png_image_stream (FILE *outfile, Gan_Image *image, double gam)
 Writes an image file to a stream in PNG format.
Gan_Bool gan_write_png_image (const char *filename, Gan_Image *image, double gam)
 Writes an image file in PNG format.
Gan_Imagegan_read_ppm_image_stream (FILE *infile, Gan_Image *image)
 Reads a RGB colour image file in PPM format from a stream.
Gan_Imagegan_read_ppm_image (const char *filename, Gan_Image *image)
 Reads a RGB colour image file in PPM format.
Gan_Bool gan_write_ppm_image_stream (FILE *outfile, Gan_Image *image)
 Writes a RGB colour image to a file stream in PPM format.
Gan_Bool gan_write_ppm_image (const char *filename, Gan_Image *image)
 Writes a RGB colour image file in PPM format.
Gan_Imagegan_read_tiff_image (const char *filename, Gan_Image *image)
 Reads an image file in TIFF format.
Gan_Bool gan_write_tiff_image_stream (FILE *outfile, Gan_Image *image)
 Writes an image file to a stream in TIFF format.
Gan_Bool gan_write_tiff_image (const char *filename, Gan_Image *image)
 Writes an image file in TIFF format.

Enumeration Type Documentation

enum Gan_ImageFileFormat
 

Image file formats supported by Gandalf.

Enumerator:
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_UNKNOWN_FORMAT  Unknown Image Format


Function Documentation

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 a 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
 

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
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
 

Reads an image file from a file stream.

Parameters:
infile Input file stream
file_format The format of the file, e.g. GAN_PNG_FORMAT
image The image structure to read the image data into 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,
Gan_Image image
 

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
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.

See also:
gan_read_image().

Gan_Bool gan_image_write_stream FILE *  outfile,
Gan_ImageFileFormat  file_format,
Gan_Image image
 

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
image The image structure to be written to the file
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_write_control_struct Gan_CineonWriteControlStruct controlstr  ) 
 

Initialises the write control 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_write_control_struct Gan_DPXWriteControlStruct controlstr  ) 
 

Initialises the write control 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().

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
 

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
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
 

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
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
 

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
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
 

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
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
 

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
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
 

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
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
 

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
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
 

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
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
 

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
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
 

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
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,
double  gam
 

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
gam Gamma correction value
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,
double  gam
 

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
gam Gamma correction value
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
 

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
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
 

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
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_tiff_image const char *  filename,
Gan_Image image
 

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
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,
Gan_Image image,
Gan_CineonWriteControlStruct controlstr
 

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
controlstr Pointer to structure controlling CINEON 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,
Gan_Image image,
Gan_CineonWriteControlStruct controlstr
 

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
controlstr Pointer to structure controlling CINEON 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,
Gan_Image image,
Gan_DPXWriteControlStruct controlstr
 

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
controlstr Pointer to structure controlling DPX 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,
Gan_Image image,
Gan_DPXWriteControlStruct controlstr
 

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
controlstr Pointer to structure controlling DPX 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,
Gan_Image image,
int  quality
 

Writes an image file in JPEG format.

Parameters:
filename The name of the image file
image The image structure to write to the file
quality Quality of JPEG compression in range 0...100
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,
Gan_Image image,
int  quality
 

Writes an image file to a stream in JPEG format.

Parameters:
outfile The file stream
image The image structure to write to the file
quality Quality value of compression in range 0...100
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,
Gan_Image image
 

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
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,
Gan_Image image
 

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
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,
Gan_Image image
 

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
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,
Gan_Image image
 

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
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,
Gan_Image image,
double  gam
 

Writes an image file in PNG format.

Parameters:
filename The name of the image file
image The image structure to write to the file
gam Gamma correction value to be applied
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,
Gan_Image image,
double  gam
 

Writes an image file to a stream in PNG format.

Parameters:
outfile The file stream
image The image structure to write to the file
gam Gamma correction value to be applied
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,
Gan_Image image
 

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
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,
Gan_Image image
 

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
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_tiff_image const char *  filename,
Gan_Image image
 

Writes an image file in TIFF format.

Parameters:
filename The name of the image file
image The image structure to write to the file
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,
Gan_Image image
 

Writes an image file to a stream in TIFF format.

Parameters:
outfile The file stream
image The image structure to write to the file
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 Sat May 21 23:52:56 2005 by  doxygen 1.4.3