Код: Выделить всё
Map hintMap = new HashMap();
List possibleFormats = new ArrayList();
possibleFormats.add(BarcodeFormat.QR_CODE);
hintMap.put(DecodeHintType.PURE_BARCODE, Boolean.FALSE);
hintMap.put(DecodeHintType.POSSIBLE_FORMATS, possibleFormats);
hintMap.put(DecodeHintType.TRY_HARDER, Boolean.TRUE);
File f = new File("/tmp/qrcode/the-qrcode-generator.com⁄.png");
BufferedImage bi = null;
try {
bi = ImageIO.read(f);
} catch (IOException e) {
Logger.logExceptionSysOutEncapsulated(e, KickStarter.class);
}
BinaryBitmap binaryBitmap = new BinaryBitmap(
(Binarizer)new HybridBinarizer(
(LuminanceSource)new BufferedImageLuminanceSource(
bi)));
MultiFormatReader reader = new MultiFormatReader();
try {
Result resulta = reader.decode(binaryBitmap, hintMap);
Logger.logInfoSysOutEncapsulated(resulta.getText(), KickStarter.class);
} catch (NotFoundException e) {
Logger.logExceptionSysOutEncapsulated(e, KickStarter.class);
}

а этот не работает:

Может ли кто-нибудь, знакомый со стандартами QRCode, увидеть здесь проблему?
Подробнее здесь: https://stackoverflow.com/questions/786 ... mo-printer
Мобильная версия