PNG-PIL Portable network graphics¶
A PNG format based on Pillow.
This format supports grayscale, RGB and RGBA images.
Parameters for reading¶
- ignoregamma : bool
- Avoid gamma correction. Default False.
Parameters for saving¶
- optimize : bool
- If present and true, instructs the PNG writer to make the output file as small as possible. This includes extra processing in order to find optimal encoder settings.
- This option controls what color image to mark as transparent.
- dpi: tuple of two scalars
- The desired dpi in each direction.
- pnginfo: PIL.PngImagePlugin.PngInfo
- Object containing text tags.
- compress_level: int
- 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 9.
optimizeoption is True
compress_levelhas no effect (it is set to 9 regardless of a value passed).
- compression: int
- Compatibility with the freeimage PNG format. If given, it overrides compress_level.
- The ICC Profile to include in the saved file.
- bits (experimental): int
- This option controls how many bits to store. If omitted, the PNG writer uses 8 bits (256 colors).
- Compatibility with the freeimage PNG format. If given, it overrides bits. In this case, given as a number between 1-256.
- dictionary (experimental): dict
- Set the ZLIB encoder dictionary.