Main Page   Modules   Compound List   File List   Compound Members   File Members  

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


Detailed Description

Module: PNG format image file I/O functions

Part of: Gandalf Library

Revision: Last edited: Author:

Copyright: (c) 2000 Imagineer Software Limited

Note:
: Works with the libpng & lz libraries

Function Documentation

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


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