New issue 1059 by grimblef...@gmail.com: Decoder doesn't like images with
transparent "white" space
http://code.google.com/p/zxing/issues/detail?id=1059
What steps will reproduce the problem?
1. Create a QR code using a transparent "white" area.
2. Paste URL to image into the decoder page.
What is the expected output? What do you see instead?
Should decode. Instead, returns "No barcode was found in this image. Either
it did not contain a barcode, or did not contain one in a supported format,
or the software was simply unable to find it. Go "Back" in your browser and
try another image."
What version of the product are you using? On what operating system?
n/a
Please provide any additional information below.
If you create the same QR code without the transparency, it decodes
correctly. The problem seems to be the decoder doesn't know how to handle
an image with a transparency.
I'm using PNG. Have not tried with GIF etc.
Can you provide an example image? I have one here that seems to decode with
a transparent background.
http://jscottsmith.org/images/isitcode/isitcode.png
It is one of several that will not decode. If I recreate them, using the
same tool but without the transparency, they decode fine.
Also, if they are displayed on screen on a white (or light yellow)
background, they scan fine with the android Barcode Reader app and also the
iOS QR Reader.
Because of this, I don't think it's the QR code itself.
Perhaps it's just something in the way the generator creates the PNG
transparency that's causing the decoder to have issues?
FWIW, this looks to be in the Java image processing stuff. The png decodes
fine in C++, which uses ImageMagick to read the png data.
The luminance data coming out of the luminance source in Java is all black.
I'm not a graphics guy, nor a c++ or java coder, but... is there no way to
tell the java module you want transparency to default to white when
decoding images with transparency?
Nevermind yeah I have a good example here too. Yeah I think the grayscale
conversion in BufferedImage isn't doing the right thing here. I need to
strip the alpha channel, or tell it to think of it as white. I can do
it "manually" but will look for an easy one-liner for a bit.
Comment #6 on issue 1059 by srowen: Decoder doesn't like images with
transparent "white" space
http://code.google.com/p/zxing/issues/detail?id=1059
I'll upload to the zxing.org server soon