I'm trying to figure out the PNG format using the following image as an example:
A different PNG image's hex representation looks like this:
Between the sections IHDR-sRGB (0f d8 e5 b7 00 00 00 01) and PLTE-IDAT (01 a3 15 58 00 00 00 0c) we have 8 bytes each. If we assume that among these four are the CRC bytes, then what are the other four bytes?
Each chunk is a four-byte length, a four-byte ID, the data, and four-byte CRC. So your IHDR chunk CRC is 0f d8 e5 b7
, and the next four bytes, 00 00 00 01
is the length of the data content of the sRGB chunk.