Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not read QRCode Image grap from some old Andriod phone #185

Closed
zozoh opened this issue Jul 9, 2014 · 7 comments
Closed

Can not read QRCode Image grap from some old Andriod phone #185

zozoh opened this issue Jul 9, 2014 · 7 comments

Comments

@zozoh
Copy link

zozoh commented Jul 9, 2014

invalid

This Image can not be read.

Exception in thread "main" java.lang.RuntimeException: com.google.zxing.NotFoundException
    at org.nutz.qrcode.QRCode.from(QRCode.java:329)
    at org.nutz.qrcode.QRCode.from(QRCode.java:287)
    at zzh.ZZHMain.main(ZZHMain.java:9)
Caused by: com.google.zxing.NotFoundException

I review the image attached, there are many light grep stripe accrossing whole image.
and the color value around RGB(177,188,194), seems should be ignore by zxing.

@srowen
Copy link
Contributor

srowen commented Jul 9, 2014

This just means that a particular frame does not decode. It's not a bug.

@srowen srowen closed this as completed Jul 9, 2014
@zozoh
Copy link
Author

zozoh commented Jul 9, 2014

Sorry, the "particular frame" is the image I upload, right?
it is a genral jpeg file, it can not be decode ?

@srowen
Copy link
Contributor

srowen commented Jul 9, 2014

Yes, that's right. No you can read JPEG files in general just fine. It maybe that this image does not decode, but a similar one does.

@zozoh
Copy link
Author

zozoh commented Jul 9, 2014

I write the test code,

BufferedImage im = ImageIO.read(new File("/home/zozoh/invalid.jpg"));
System.out.printf("image width:%d, height:%d\n",
                  im.getWidth(),
                  im.getHeight());

it will output

image width:1280, height:720

Does it mean that the image I uploaded is readable and decodable?

@srowen
Copy link
Contributor

srowen commented Jul 9, 2014

There you are just reading an image. Yes it sounds readable. I am saying that the particular image reprsented by your file is not decodable as a barcode.

@zozoh
Copy link
Author

zozoh commented Jul 9, 2014

I am very curious that why it can not be decoded as a barcode?
I try to understand the zxing decoding logic, but it is too hard for me to learn.
Could you dig the reason, that will be appreciate a lot :)

@srowen
Copy link
Contributor

srowen commented Jul 9, 2014

It is almost certainly because the finder patterns were not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants