int tsmWriteImage ( Image_t *image, char const *filename, TsmImageType format )

Write out an Image_t structure to a file on disk

Documentation

Write out an Image_t structure to a file on disk.

This function will save the contents of an Image_t structure out to a localhost filename or URL. A number of image formats can be supported by this function, as specified by the format parameter.

Currently, the PPM/PGM (TSM_PPM) and GIF (TSM_GIF) formats are supported. N.B. the GIF writer generates uncompressed GIF images. This means we don't need to worry about the licensing issues surrounding the use LZW compression in GIF.

This function will append an appropriate filename extension to your filename before saving, e.g. ".gif" for GIF images, ".ppm" for PPM images, etc.

Returns:
TRUE if the image was written successfully, otherwise FALSE.
Parameters:
image - (Image_t *) = pointer to the Image_t structure
filename - (char *) = the filename or file:
format - (TsmImageType) = currently only TSM_PPM
Author:
Martin Reddy
Version:
9 March 1999
See Also:
tsmReadImage, tsmFreeImage


TSMAPI_RELEASE 2.1 - Release Date: 2001/01/10 19:01:12

Back to tsmApi Home Page