Qrcode unrecognized

I have an image with two qrcode, and I’d like to read the left one, but it can not be recognized by Aspose. Here is the detailed information:
655ac41771d3cc7655aa2f9e copy.jpg (233.2 KB)

Screen Shot 2023-11-27 at 1.49.54 PM.png (79.7 KB)

maven version:

com.aspose
aspose-barcode
23.7

public String execute(File file) {
    try {
        Locale.setDefault(Locale.ENGLISH);
        BarCodeReader reader = new BarCodeReader(file.toPath().toString(), DecodeType.QR);
        BarCodeResult[] barCodeResults = reader.readBarCodes();
        for (BarCodeResult barCodeResult : barCodeResults) {
            String codeText = barCodeResult.getCodeText();
            if (!codeText.startsWith("**")) {
                Locale.setDefault(Locale.TAIWAN);
                return codeText.trim().replace("\n", "");
            } else {
                log.debug("Aspose detected **");
            }
        }
    } catch (Exception e) {
        log.error("execute() error: exception caught by Aspose ", e);
        throw new RuntimeException("no recognize", e);
    }
    log.error("execute() error:Aspose not detected or only detected **");
    throw new RuntimeException("no recognize");
}

Hope to hear from you soon, Thank you

@makiliu,

I tested your scenario/case with your both barcode images using latest version: Aspose.BarCode for Java, it works fine and I can read the QR code using the sample code segment:
e.g.
Sample code:

com.aspose.barcode.License lic1 = new com.aspose.barcode.License();
lic1.setLicense("Aspose.BarCode.Java.lic");
Locale.setDefault(Locale.ENGLISH);
com.aspose.barcode.barcoderecognition.BarCodeReader reader = new com.aspose.barcode.barcoderecognition.BarCodeReader("f:\\files\\24549210admin_24549210_655ac41771d3cc7655aa2f9e copy.jpg", DecodeType.QR);
//com.aspose.barcode.barcoderecognition.BarCodeReader reader = new com.aspose.barcode.barcoderecognition.BarCodeReader("f:\\files\\Screen Shot 2023-11-27 at 1.49.54 PM.png", DecodeType.QR);
com.aspose.barcode.barcoderecognition.BarCodeResult[] barCodeResults = reader.readBarCodes();
System.out.println(barCodeResults.length);
for (com.aspose.barcode.barcoderecognition.BarCodeResult barCodeResult : barCodeResults) {
      String codeText = barCodeResult.getCodeText();
      if (!codeText.startsWith("**")) {
                Locale.setDefault(Locale.TAIWAN);
                System.out.println(codeText.trim().replace("\n", ""));
      }
}

output:

2
UE796545481121101    000000a8000000b01134937070759575YguePdcxwjyA82wiLg++Cw==:**********:1:1:1:承攬業倉儲費 記帳客:1:168:

Thank you for your prompt response.

I followed your advice and upgraded to version 23.11 in my Java Spring Boot project (Java version 11, Maven project). Unfortunately, the results were unsuccessful as the QR codes are still not being recognized.

Upon reviewing the code, the only difference between your sample and my snippet lies in the license part. I didn’t include the license – could this be the reason for the failure?

Additionally, when attempting to obtain a temporary license for testing purposes, I encountered issues with the website.

Screen Shot 2023-11-28 at 9.04.14 AM.png (183.3 KB)

Hope to hear from you soon, Thank you

@makiliu,

Yes, you may try with a valid (temporary) license if it works fine on your end. You may request a temporary license by posting in the Aspose.Purchase section.

Thank you for your excellent support.
I will post to request temporary license as advised.

@makiliu,

You are welcome.