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
|