SaveImage()

Save the image of the screen in a file.

Usage

fileName = SaveImage( width = 600, height = 400,
                      fileName = None, fileType = 'png',
                      dirName = None )

Parameters

width (integer)
Width of image.
height (integer)
Height of image.
fileName (string)
Image file name.
fileType (string)
Image file type.
dirName (string)
The directory that image will be saved in it.

Return Value

fileName (string)
Saved image file name (including the full path of file).

Error

The fileType should be valid.

Description

This routine saves the image of the screen in a file. The image width and height are given by width and height, its file name and file type are given by fileName and fileType and the directory that image will be saved to is given by dirName. For example,
SaveImage( fileName = 'file.png',