CImage:Save


The Save method saves the CImage back. Alternative saving commands are SaveAs, which opens a Save dialog where you specify the name and file type, and SaveTo, which takes a string containing the path name.

Syntax

bSuccess = CImage:Save()

where

    bSuccess is the returned success code. On success it is true, otherwise false.

  

If you are finished with the image after saving, use Close or delete to remove it from memory

Example

Suppose a CImage I exists. The following script saves it back to its original path:

bSuccess = I:Save()

-- save the image

if not bSuccess then

-- if not saved, then...

  Printf("Image can't be saved\n" )

-- error message

end

 

Related Topics

SaveAs

SaveTo

Open

Close

CImage class