Having the image with this big a resolution is not good.
Resizing the image down to one quarter (0.5 x 0.5) makes it readable.
Large images commonly fail to decode.
You should take that into consideration when building your application.
2012/9/17 mabicha <
mana...@gmail.com>:
> Hi,
>
> I am trying to write a java application where if the user provides me with
> an image containing a QRcode then the application detects and decodes the
> QRcode in the image and outputs the decoded text.
> So I wrote a java class similar to
> RGBLuminance(zxing-2.0/androidtest/src/com/google/zxing/client/androidtest/RGBLuminanceSource.java)
> which extends LuminanceSource. Then I use following code to decode the
> QRcode in the image:-
>
> ----------------------
>
> RGBLuminance rgb = new RGBLuminance(pngReader);
> HybridBinarizer rgbHB = new HybridBinarizer(rgb);
> BinaryBitmap bitmap = new BinaryBitmap(rgbHB);
> QRCodeReader reader = new QRCodeReader();
> Result result = reader.decode(bitmap);
> String contents = result.getText();
> ----------------------
>
> Now my application works fine on QRcode images I download from the internet.
> But if I take a picture of the same image from my camera and try to decode
> it using my application I get error: "com.google.zxing.NotFoundException"
> I found the same behavior when I use zxing online decoder:
>
http://zxing.org/w/decode.jspx . When I use this online decoder to decode a
> QRcode in a photo taken from my camera I get error saying: "Bad Image. The
> image you uploaded could not be decoded, or was too large. Go "Back" in your
> browser and try another image."
>
> Also, I am able to decode all these QRcodes using Zxing's Barcode scanner
> app on my Nexus S, including the ones on the photo I took from my camera.
> I am attaching some sample QRcode images which I can't decode using my java
> application or zxing online decoder, but can decode it using Zxing's Barcode
> scanner app.
> Can somebody please tell me what I might be doing wrong here and how can I
> make this work ?
>
> Thanks!!
> Manas
>
>
>
>
>
> --
>
>
>