problem with scan QR from Image

22 views
Skip to first unread message

Григорий Гилазев

unread,
Nov 15, 2019, 6:13:20 AM11/15/19
to CodenameOne Discussions
IDE: Eclipse/IDEA
Device with Android

Hello to all!

i use zxing for scan QR from image from gallery:
RGBLuminanceSource rgbls = new RGBLuminanceSource(img.getWidth(), img.getHeight(), img.getRGB());
Binarizer binarizer = new HybridBinarizer(rgbls);
BinaryBitmap binBitmap = new BinaryBitmap(binarizer);
Result qrCodeResult = new MultiFormatReader().decode(binBitmap);

If image is sterile how https://ib43.ru/qr.gif then all ok
but if image like https://ib43.ru/qr3.jpg than the program hangs

Desktop version of zxing hood work with both via BufferedImageLuminanceSource(img)

How i can scan QR code from image, not from camera?

Shai Almog

unread,
Nov 15, 2019, 10:24:26 PM11/15/19
to CodenameOne Discussions
Hi,
is this related to Codename One?

Григорий Гилазев

unread,
Nov 16, 2019, 2:36:51 AM11/16/19
to CodenameOne Discussions
not really. There is simply no choice of libraries, but the proposed one has a problem for me. Maybe someone has already come across and decided

Shai Almog

unread,
Nov 16, 2019, 8:46:52 PM11/16/19
to CodenameOne Discussions
We support 3 separate QR libraries.
Is this a question about embedding the zxing library into Codename One?

Григорий Гилазев

unread,
Nov 17, 2019, 4:02:02 AM11/17/19
to CodenameOne Discussions
No problem, I found making this library work
Reply all
Reply to author
Forward
0 new messages