Rename header as signature and keep tally of chunk count
Rename header as signature and keep tally of chunk count

Signature is different to header - the latter is a IHDR chunk which must be the first chunk after the signature.

Keeping a tally of how many chunks have been processed will allow validation of location-specific chunks such as IHDR and IEND.

UoMCS/php-png