PNG and APNG features
The following features are supported for PNG and APNG:
Headers
The "headers" feature for PNG and APNG exports all data from the
header chunks (all chunks which are not IDAT or fdAT).
Each type of chunk exports an object with the name of its tag.
For chunks that may appear multiple times, an Array is exported
instead of an object.
I won’t go into detail for each field in each header.
You should read the PNG specification for that.
TODO: number
TODO: string
TODO: an Array with 3 numbers: [ red, green, blue ]
TODO: an Array of numbers with the histogram
TODO: an Array with 5 numbers: [ red, green, blue, alpha, frequency ]
TODO: depending on IHDR.color_type:
0or4: anObjectwith 1 number:"grey"2or6: anObjectwith 3 numbers:"red","green", and"blue"3: anArraywith numbers
TODO: depending on IHDR.color_type:
0: anObjectwith 1 number:"grey"2or3: anObjectwith 3 numbers:"red","green", and"blue"4: anObjectwith 2 numbers:"grey"and"alpha"6: anObjectwith 4 numbers:"red","green","blue", and"alpha"
TODO: depending on IHDR.color_type:
0: anObjectwith 1 number:"grey"2: anObjectwith 3 numbers:"red","green", and"blue"3: anArraywith numbers
TODO: an Array of bytes with custom (decompressed) zlib data
TODO: a string (possibly decompressed zlib data, depending on the flag field)
Image Data
The "idat" feature for PNG and APNG exports all image data
(IDAT and fdAT chunks).
NOTE: interlaced PNG images will have a "passes" array instead of "rows".
It works differently, using Adam7 interlacing.
Each pass has a different number of bytes in the row (TODO: describe).
TODO: row:
- Each
rowof image data is anArraywith numbers. - The first value in the
Arrayis thefilter_type, which can be0: None1: Sub2: Up3: Average4: Paeth
- All subsequent values in the
Arrayare numbers that represent the image data compressed with thefilter_typeabove.
TODO: number:
- The
"compression_level"field will instructFFglitchon what compression level to use in thezliblibrary to compress the data. Default is-1, and values may go from0(no compression) to9(best compression).
TODO: number:
fdATchunks have an extrasequence_numberfield.