Decode a PNG image file.
Result is a mapping,
([
"image": object image,
... options ...
])
image is the stored image.
Valid entries in options is a superset
of the one given to encode :
basic options:
"alpha": object alpha, - alpha channel
"palette": object colortable, - image palette
(if non-truecolor)
advanced options:
"background": array(int) color, - suggested background color
"background_index": int index, - what index in colortable
"chroma": ({ float white_point_x,
float white_point_y,
float red_x,
float red_y, - CIE x,y chromaticities
float green_x,
float green_y,
float blue_x,
float blue_y })
"gamma": float gamma, - gamma
"spalette": object colortable, - suggested palette,
for truecolor images
"histogram": array(int) hist, - histogram for the image,
corresponds to palette index
"physical": ({ int unit, - physical pixel dimension
int x,y }) unit 0 means pixels/meter
"sbit": array(int) sbits - significant bits
"text": array(array(string)) text - text information,
({ ({ keyword, data }), ... })
Standard keywords:
Title Short (one line) title or caption for image
Author Name of image's creator
Description Description of image (possibly long)
Copyright Copyright notice
Creation Time Time of original image creation
Software Software used to create the image
Disclaimer Legal disclaimer
Warning Warning of nature of content
Source Device used to create the image
Comment Miscellaneous comment
"time": ({ int year, month, day, - time of last modification
hour, minute, second })
wizard options:
"compression": int method - compression method (0)
This method can also take options,
as a mapping:
advanced options:
"palette": colortable object
- replace the decoded palette with this when
unpacking the image data, if applicable