Hello, we have moved up from version 2.5 to 22.6. Since then, EAN128 barcodes are no longer recognized.
I have set QualitySettings to QualitySettings.getMaxBarCodes()
The barcode also looks a bit funny. Just ask me why it was recognized earlier.
The result must be 0132203727.
CapturFiles_2022-08-15_15-16.jpg (21.1 KB)
Greetings
Dennis
@Dennis.Weidner,
Thanks for the barcode image.
I did test your scenario/case using the following sample code with latest version (Aspose.BarCode for Java 22.6) and the API does not detect the barcode from your attached image file.
e.g.
Sample code:
BarCodeReader reader = new BarCodeReader("f:\\files\\CapturFiles_2022-08-15_15-16.jpg", DecodeType.ALL_SUPPORTED_TYPES);
reader.setQualitySettings(QualitySettings.getMaxBarCodes());
System.out.println(reader.readBarCodes().length);//0
for (BarCodeResult result : reader.readBarCodes()) {
System.out.println("CodeText: " + result.getCodeText());
System.out.println("Symbology type: " + result.getCodeType());
System.out.println("Percentage recognition: " + result.getReadingQuality());
}
I also tested using some older versions but they also do not detect the barcode from your attached image file. Could you please share your sample code that you are using with latest version. Also, what code you were using with older version which detects the barcode in the image fine? We will evaluate your issue further.
Hey, thanks for the effort.
Attached the code with which the barcode is recognized. aspose-barcode-2.5.0 from 2011.01.23
BufferedImage image = ImageIO.read(new File("./CapturFiles_2022-08-15_15-16.png"));
final BarCodeReader reader = new BarCodeReader(image, SupportedBarcode.getBarcodeType(SupportedBarcode.EAN128));
try {
while (reader.read()) {
System.out.println("CODE " + reader.getReadType());
System.out.println("CODE WRT " + reader.getCodeText());
}
} finally {
if (reader != null)
reader.close();
}
And that the output
CODE EAN128
CODE WRT 0132203727
@Dennis.Weidner,
Thanks for the sample and further details.
Since we were already able to reproduce the issue as you mentioned using image file as we found EAN128 barcode was not detected by the API. So, we have logged a ticket with an id “BARCODEJAVA-1416” for your issue. We will look into it soon.
Once we have an update on it, we will let you know.
The barcode contains incorrect checksum. Here is .Net code which allows to recognize it. But without checksum check the engine will see big number of ghost barcodes on any image noise like text or tables.
using (BarCodeReader reader = new BarCodeReader(@"d:\save\rec\this.bmp", DecodeType.Code128))
{
//disable checksum
reader.BarcodeSettings.ChecksumValidation = ChecksumValidation.Off;
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine($"Type:{result.CodeTypeName}");
Console.WriteLine($"Codetext:{result.CodeText}");
}
}
Hello,
I had already suspected something like that.
With reader.setChecksumValidation(ChecksumValidation.OFF);
the barcode can be read again. But we will look for the cause of the wrong barcode as soon as possible and fix it.
Thanks
Dennis
@Dennis.Weidner ,
We are pleased to inform you that your issue (Ticket ID: “BARCODEJAVA-1416”) has been resolved. We anticipate that the fix/enhancement will be part of the next release (Aspose.BarCode v24.12), expected before the end of this month. Stay connected!