Max TenEyck Woodbury max at mtew.isa-geek.net
Fri Oct 5 17:41:28 CDT 2012

On 10/05/2012 05:53 PM, Vincent Povirk wrote:
>> 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
> returned.

Agreed then.  This is only one part of the total aggregate interface.
If this routine is implemented, the other methods need to be done as
well.  The enumeration of the chunks needs to be recorded.

>> 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 think the CRC check would be a good idea.  As the rational in the spec
mentioned, doing it guards against transition (and other) errors.
<cynic_mode>No assurance that Murphy (or his so unkind worshipers)
can't get in of course.</cynic_mode>

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

I was thinking about other formats the IWIC framework has to handle.
Not just about PNG.

More information about the wine-devel mailing list