Vincent Povirk madewokherd at gmail.com
Fri Oct 5 16:53:19 CDT 2012

> Beyond that, I am not sure what you are talking about.  The value to be
> returned (at the address specified by the 2nd parameter) is an unsigned
> integer.  There is no place to return 'chunks'; only a place to return a
> count.

Other methods on that interface allow you to return an
IWICMetadataReader, which need to be based on individual PNG chunks.
Obviously, the GetCount method just gives the number that can be

> In order to get that count, each and every one of the chunks needs to
> be scanned and validated.  During the scanning process, it would make
> sense to store the location of chunks in an indexed data structure.
> That would nominally be an array, but a linked list or tree would also
> work.

I don't think it's really necessary to verify the checksum. You just
need to read a few bytes of header to get the chunk type and the
location of the next one. See the png_read_chunk function.

I don't understand anything you said after that paragraph.

More information about the wine-devel mailing list