I\'m trying to understand how data are stored into IDAT chunk. I\'m writing a little PHP class and I can retrieve most of chunks information but what I get for IDAT doesn\'t mat
To add to @Andreas (+1) parsing, two things to note:
A PNG file can have (and often has) many IDAT chunks, they must be concatenated to recover the compressed zlib stream. http://www.w3.org/TR/PNG/#10CompressionFSL
Gzip/Compress/Deflate are all related but are not exactly the same. PNG uses deflate/inflate. I'd try with gzdeflate/gzinflate