CImage:SaveAs
The SaveAs method saves the CImage to a file with a new name as entered into a Windows Save As dialog. Also see the SaveTo method.
bResult = CImage:SaveAs( sPath ) |
bResult = CImage:SaveAs() |
If you do not specify the new name sPath, Mira prompts for it with by opening a Windows Save As dialog. If you click Cancel on the Save As dialog, Mira returns false. Testing for false is a handy way to exit a loop that saves multiple images.
This method opens a Save As dialog every time. Therefore, when using a loop to save multiple images to a new file name, you may wish to use the SaveTo method. Alternatively, you can call SaveAs for the first file name, extract what you need from the entered text, then switch to SaveTo for the remaining images.
Suppose a CImage named I contains an image to be saved. The following script fragment saves it to a new file after prompting for the new filename:
|
-- create a CImage object |
|
-- Note: No path name specified |
|
-- do something |