save(filename[,callback=None, format=None, quality=75, bpp=24, compression=’default’ ])
Note: Not supported in S60 1st Edition!
Saves the image into the given file. The supported formats are JPEG and PNG. If format is not
given or is set to None, the format is determined based on the file name extension: ’.jpg’ or
’.jpeg’ are interpreted to be in JPEG format and ’.png’ to be in PNG format. filename should
be a full path name.
When saving in JPEG format, the quality argument specifies the quality to be used and can range
from 1 to 100.
When saving in PNG format, the bpp argument specifies how many bits per pixel the resulting file
should have, and compression specifies the compression level to be used.
Valid values for bpp are:
- 1: Black and white, 1 bit per pixel
- 8: 256 gray shades, 8 bits per pixel
- 24: 16.7 million colors, 24 bits per pixel
Valid values for compression are:
- ’best’: The highest possible compression ratio, the slowest speed
- ’fast’: The fastest possible saving, moderate compression
- ’no’: No compression, very large file size
- ’default’: Default compression, a compromise between file size and speed
If callback is given, the operation is asynchronous. When the saving is complete, the callback is
called with the result code.