Extracted from Pike v7.6 release 61 at 2005-12-30.
pike.ida.liu.se
[Top]
Image
Image.PNG

Method Image.PNG.encode()


Method encode

string Image.PNG.encode(Image.Image image)
string Image.PNG.encode(Image.Image image, mapping options)

Description

Encodes a PNG image.

Parameter options
"alpha" : Image.Image

Use this image as alpha channel (Note: PNG alpha channel is grey. The values are calculated by (r+2g+b)/4.)

"palette" : Image.Colortable

Use this as palette for pseudocolor encoding (Note: encoding with alpha channel and pseudocolor at the same time are not supported)


See also

__decode

Note

Please read some about PNG files.