Bugs: Browse | Submit New | Admin

[#18216] png format appears to be non standard

Date:
2008-02-19 21:07
Priority:
3
Submitted By:
anselm hook (anselmhook)
Assigned To:
Ryan Davis (zenspider)
Category:
png
State:
Open
Summary:
png format appears to be non standard

Detailed description
Here is an image created with libqrcode - in C:

  http://qrcodelove.com/images/test2.png  << does look ok in a browser

Here is the same image created with the qrencoder encoder gem - relying on the png gem:

  http://qrcodelove.com/images/test.png   <<< does look ok in a browser

See any difference?  No?

Ok try this:

  http://zxing.org/w/decode?u=http%3A%2F%2Fqrcodelove.com%2Fimages%2Ftest.png

And

  http://zxing.org/w/decode?u=http%3A%2F%2Fqrcodelove.com%2Fimages%2Ftest2.png

What we see is that for some mysterious reason - the image created by the png gem fails.  { The first case above fails
}

Ok, but perhaps that is just a failure of the zxing's decoder - in not handling all variations of png.  Surely ImageMagick
could process anything right?  Not so.    Here is the same image converted to a bmp by ImageMagick:

  convert test.png test.bmp
  http://qrcodelove.com/images/test.bmp   << fails

Garbage.

Ok, perhaps the ImageMagick png reader is broken?  Can it convert another png - say such as the one generated by
libqrcode?

  convert test2.png test2.bmp
  http://qrcodelove.com/images/test2.bmp   << works

Yes.

So; this leaves one likely possibility - if a variety of external tools are unable to actually manipulate the png -
the png is corrupt in some subtle way.

The firefox browser probably has an unusually permissive png handler since it has to deal with a lot of different edge
cases, but more strict parsers are failing.

a

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item