Help on method save in module PIL.Image:
save(fp, format=None, **params) method of PIL.Image.Image instance
Saves this image under the given filename. If no format is
specified, the format to use is determined from the filename
extension, if possible.
Keyword options can be used to provide additional instructions
to the writer. If a writer doesn't recognise an option, it is
silently ignored. The available options are described later in
this handbook.
You can use a file object instead of a filename. In this case,
you must always specify the format. The file object must
implement the **seek**, **tell**, and **write**
methods, and be opened in binary mode.
:param file: File name or file object.
:param format: Optional format override. If omitted, the
format to use is determined from the filename extension.
If a file object was used instead of a filename, this
parameter should always be used.
:param options: Extra parameters to the image writer.
:returns: None
:exception KeyError: If the output format could not be determined
from the file name. Use the format option to solve this.
:exception IOError: If the file could not be written. The file
may have been created, and may contain partial data.
Partager