I'm trying to scan this image using native library. I'm always getting "0" from scanner.scanImage(barcode):
Thanks to bring ZBar to Android.](http://paste2.org/p/1940529)
I suspect there's an issue with the data formats not matching (ie: we can't just assume it's Y800).
Try this out, it worked for me.
Bitmap barcodeBmp = BitmapFactory.decodeResource(getResources(),
int width = barcodeBmp.getWidth();
int height = barcodeBmp.getHeight();
int pixels = new int;
barcodeBmp.getPixels(pixels, 0, width, 0, 0, width, height);
Image barcode = new Image(width, height, "RGB4");
int result = scanner.scanImage(barcode.convert("Y800"));
I'll add this test to the examples.
It works! Thank you!
Hey i am new to scanning and i have the same problem but i couldn't fix it it gives me java.lang.ArrayIndexOutOfBoundsException
can u help me Lisa Huang plz?
hey,maybe you can find a clue thought this java reader http://www.keepautomation.com/products/java_barcode_reader/
Log in to post a comment.