Browse our Products

Aspose.BarCode for Python via Java 25.11

All Changes

KeySummaryCategory
BARCODENET-39404Improve recognition performance of inverted barcodesEnhancement

Features and Improvements

Inverted Barcodes Recognition Performance

The recognition performance for inverted barcodes, where foreground and background colors are swapped, has been significantly improved. These enhancements provide more reliable decoding:

  • in scanned documents that contain negative or inverted images,
  • in high-contrast PDF files and document-processing workflows.

The feature can be enabled via the setInverseImage(InverseImageMode) quality setting:

gen = BarcodeGenerator(EncodeTypes.DATA_MATRIX, "0126789ABCDEFabcdef")
gen.getParameters().getBarcode().setBarColor(ImageColor.getrgb("#FFFFFF"))
gen.getParameters().setBackColor(ImageColor.getrgb("#000000"))
reader = BarCodeReader(gen.generateBarCodeImage(), None,  DecodeType.DATA_MATRIX)
reader.getQualitySettings().setInverseImage(InverseImageMode.ENABLED)
results = reader.readBarCodes()
for result in results:
    print("Code Text: " + result.getCodeText(None))
    print("Code Type: " + result.getCodeTypeName())

No changes in this release.