Main Page   Modules   Compound List   File List   Compound Members   File Members  

pgm_io.h File Reference

#include <stdio.h>
#include <gandalf/common/misc_defs.h>
#include <gandalf/image/image_defs.h>

Go to the source code of this file.

Functions

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.


Detailed Description

Module: PGM format image file I/O functions

Part of: Gandalf Library

Revision: Last edited: Author:

Copyright: (c) 2000 Imagineer Software Limited


Function Documentation

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_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().


Generated on Mon Oct 13 16:14:45 2003 by doxygen1.3-rc1