int tsmSaveImage ( TsmConnection connect, uchar *tileBuffer, char *filename, TsmImageType type )

This function will write out a single TerraVision tile (e

Documentation

This function will write out a single TerraVision tile (e.g. as returned by tsmReadTile) to an image file on disk. You need to pass the connection handle that was used to read the tile from (so that the information such as the dimensions of the tile may by gleaned), a localhost filename (or file: URL) to write the image file to, and an image format. Currently supported image formats are:

A filename extension will be added to your filename automatically (if not already supplied), i.e. one of ppm, gif, or jpg, respectively.

Note that when you choose TSM_PPM, the output image will be in ppm format if the image data is RGB, or pgm format if grayscale.

You can use the tsmSet(c,TSM_JPEG_QUALITY,v) function call as normal to set the jpeg quality level that is used to create the JPEG/JFIF format files.

Returns:
TRUE if image file written successfully, FALSE if error occurred
Parameters:
connect - a connection handle, as returned by tsmConnect
tileBuffer - a TerraVision tile buffer, as returned by tsmReadTile
filename - the filename/URL for the file to write to on disk
type - one of TSM_PPM, TSM_GIF, or TSM_JFIF
Author:
Martin Reddy
Version:
12 January 1998
See Also:
tsmSet, tsmReadTile


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

Back to tsmApi Home Page