Merge pull request #1078 from kmike/png-docs

DOC document compress_level option of Image.save for PNG images
This commit is contained in:
wiredfool 2015-01-15 19:07:12 -08:00
commit fbc33970dd

View File

@ -357,6 +357,12 @@ The :py:meth:`~PIL.Image.Image.save` method supports the following options:
**pnginfo** **pnginfo**
A :py:class:`PIL.PngImagePlugin.PngInfo` instance containing text tags. A :py:class:`PIL.PngImagePlugin.PngInfo` instance containing text tags.
**compress_level**
ZLIB compression level, a number between 0 and 9: 1 gives best speed,
9 gives best compression, 0 gives no compression at all. Default is 6.
When ``optimize`` option is True ``compress_level`` has no effect
(it is set to 9 regardless of a value passed).
**bits (experimental)** **bits (experimental)**
For ``P`` images, this option controls how many bits to store. If omitted, For ``P`` images, this option controls how many bits to store. If omitted,
the PNG writer uses 8 bits (256 colors). the PNG writer uses 8 bits (256 colors).