Extracted from Pike v7.4 release 117 at 2004-07-26.
pike.ida.liu.se
[Top]
predef::
Image
Image.PNG

Method Image.PNG.__decode()


Method __decode

array Image.PNG.__decode(string data)
array Image.PNG.__decode(string data, object intdontcheckcrc)

Description

Splits a PNG file into chunks.

Result is an array of arrays, ({ ({ string chunk_type, string data, int crc_ok }), ({ string chunk_type, string data, int crc_ok }) ... })

chunk_type is the type of the chunk, like "IHDR" or "IDAT".

data is the actual chunk data.

crcok is set to 1 if the checksum is ok and dontcheckcrc parameter isn't set.

Returns 0 if it isn't a PNG file.

Note

Please read about the PNG file format.