Main Page   Modules   Compound List   File List   Compound Members   File Members  

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


Detailed Description

Module: JPEG format image file I/O functions

Part of: Gandalf Library

Revision: Last edited: Author:

Copyright: (c) 2000 Imagineer Software Limited

Note:
: Works with the libjpeg library

Function Documentation

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


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