[webkit-reviews] review requested: [Bug 7668] ImageDiff is not endian safe : [Attachment 7050] use CG and at least makes the checksum code more robust

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Mon Mar 13 12:35:22 PST 2006

Eric Seidel <macdome at opendarwin.org> has asked	for review:
Bug 7668: ImageDiff is not endian safe

Attachment 7050: use CG and at least makes the checksum code more robust

------- Additional Comments from Eric Seidel <macdome at opendarwin.org>
So I'm not sure this patch is a final total solution, but it does seem to fix
at least the checksum code.  It seems tha NSBitmapImageRep generally holding
the data in a big-endian format in its buffer (likely because that's how it
read it out of the png).  This foces CG to store the data in host-endian
format, which seems to make MD5 more happy (since it seems to do it's own
swizzling for whatever reason).  I also improved both ImageDiff and the MD5
code to ignore any extra padding data at the end of rows.  ImageDiff is not yet
truely endian safe, but it seems to work.  There are other larger pixel dump
issues now to solve next (like the spacing around ")" on some machines.

More information about the webkit-reviews mailing list