Previous - imgFromObject Section Home - Images Next - imgToMember


imgSave ( )

Saves a copy of the image in Rosetta's memory buffer onto the hard disk.

Usage:

imgSave (object me, string filePath)

Parameters:

filePath (string) - The path to save the new image file.

Returns:

(integer) - The success code

Example:

xtRose = xtra("Rosetta").new( )
xtRose.imgOpen( "C:\windows\winnt.bmp" )
xtRose.imgSave( "C:\roseImage.png" )

Notes:

The file extension in filePath is automatically parsed to determine the encoding image format. The image file extensions supported are BMP, GIF, JPG, JPEG, PNG, TIF, TIFF, TGA, ICO, PCX, J2K, JP2, JPC, and PDF. Some file types may require a change in image depth. For example, to save a jpg, the image must be at least 24 bits. If that image is 8 bits or less, use imgSetDepth(24) to adjust the image depth before calling imgSave on the JPG.

If a file already existing in parameter filePath, imgSave will automatically overwrite any existing file with write permission.


Previous - imgFromObject Section Home - Images Next - imgToMember