Method Image.PNG.encode()
- Method
encode
stringencode(Image.Imageimage)
stringencode(Image.Imageimage,mappingoptions)- Description
Encodes a PNG image.
- Parameter
options "alpha":Image.ImageUse this image as alpha channel (Note: PNG alpha channel is grey. The values are calculated by (r+2g+b)/4.)
"palette":Image.ColortableUse this as palette for pseudocolor encoding (Note: encoding with alpha channel and pseudocolor at the same time are not supported)
"zlevel":int(0..9)The level of z-compression to be applied. Default is 9.
"zstrategy":intThe type of LZ77 strategy to be used. Possible values are Gz.DEFAULT_STRATEGY, Gz.FILTERED, Gz.HUFFMAN_ONLY, Gz.RLE, Gz.FIXED. Default is Gz.DEFAULT_STRATEGY.
- See also
- Note
Please read some about PNG files.