CImage:SaveTo


The SaveTo method saves the CImage to a file with a new file name. This method does not prompt for the new file name. To prompt, use SaveAs.

Syntax

bResult = CImage:SaveTo( sPath )

bullet.gif    sPath is the new file name, including the full path.

bullet.gif    On success, this method returns true. If unsuccessful, it returns false.

Remarks

When using a loop to save multiple images, you may wish to prompt for the text fragment to be used for renaming the files. You can do that for the first image in the loop by using the SaveAs class method to select the path or get a template file name, or by calling the global GetString function. Afer the first image is saved, you can use SaveTo for the remaining images.

Example

Suppose a CImage object I contains an image to be saved with a new file name. The following script does this without prompting for the new filename:

I = new_image()

-- create a CImage object

sPath = C:\\NewName.fts"

-- the new file name

bOk = I:SaveTo( sPath )

-- Save the image to its new file name

  ...

-- do something

Related Topics

CImage class, SaveAs, Save


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.