Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Code from appium-read-qrcode
private static String decodeQRCode(BufferedImage qrCodeImage) {
Result result = null;
try {
LuminanceSource source = new BufferedImageLuminanceSource(qrCodeImage);
BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
result = new MultiFormatReader().decode(bitmap);
} catch (NotFoundException e) {
log.error("QRCode not found", e);
return result.getText();
Copy link

eliasnogueira commented Feb 11, 2021

The complete code can be found at

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