Not reading barcode from certain images

Recently, i started using the barcode reader for java and it doesn’t read the ‘Datamatrix’ type of codes in certain images. Attached the sample. Please investigate and get back to me. I tried this with the ‘getMaxCodes’ mode as well. Nothing returned.

Using maven dependency version :22.10
Quality settings:
barcodeReader = new BarCodeReader();
Please advise.sample_label.jpeg (20.1 KB)


Thanks for the barcode image file.

Please notice, I am able to reproduce the issue as you mentioned by using the following sample code with your image file. I found Aspose.BarCode for Java is not reading barcode from the image:
Sample code:

BarCodeReader reader = new BarCodeReader("f:\\files\\sample_label.jpeg", DecodeType.ALL_SUPPORTED_TYPES);
BarCodeResult []result = reader.readBarCodes();
for (int j = 0; j < result.length; j++) 
    System.out.println("CodeText: " + result[j].getCodeText());
    System.out.println("Symbology type: " + result[j].getCodeType());


I have logged a ticket with an id “BARCODEJAVA-1487” for your issue. We will look into the details of the issue. Once we have an update on it, we will let you know.

1 Like