Skip to content

Instantly share code, notes, and snippets.

Embed
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();
}
@eliasnogueira

This comment has been minimized.

Copy link
Owner Author

@eliasnogueira eliasnogueira commented Feb 11, 2021

The complete code can be found at https://github.com/eliasnogueira/appium-read-qrcode

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