Android zxing NotFoundException

后端 未结 3 1405
既然无缘
既然无缘 2021-01-23 01:58

I\'m using zxing to decode QRcode images, but it always returns a NotFoundException. The online decoder at http://zxing.org/w/decode.jspx scans these images perfectly fine, so i

3条回答
  •  执笔经年
    2021-01-23 02:27

    According to an answer to a related question, using the TRY_HARDER decode hint might help, since it "optmizes for accuracy, not speed":

    Hashtable decodeHints = new Hashtable();
    decodeHints.put(DecodeHintType.TRY_HARDER, Boolean.TRUE);
    Result result = reader.decode(bitmap, decodeHints);
    

    If the same image is being correctly interpreted in the online service but failing in your case, it's probable that they have TRY_HARDER on while you have it off.

提交回复
热议问题