string Image.PNG.encode(Image.Image image) string Image.PNG.encode(Image.Image image, mapping options)
Encodes a PNG image.
Use this image as alpha channel (Note: PNG alpha channel is grey. The values are calculated by (r+2g+b)/4.)
Use this as palette for pseudocolor encoding (Note: encoding with alpha channel and pseudocolor at the same time are not supported)
__decode
Please read some about PNG files.