File.saveImage

From MiniScript Wiki
Jump to navigation Jump to search

File.saveImage saves an Image to disk.

Arguments

Parameter Name Type Default Value Meaning
path string null file name or (partial or full) path of file to create
image image null picture to save
quality number 80 JPEG compression quality

Usage Notes

The image format is determined by the file extension on the given path. If the path ends in ".jpg" or ".jpeg", then the image will be saved in JPEG format, using the compression quality given by the third parameter. If the path ends in ".tga" then the image is saved in TGA format. In any other case, the image is saved in PNG format (including transparency).

If successful, this method returns null. If it fails, it returns an error message.

See also: PixelDisplay.getImage.