Public API Changes in Aspose.BarCode 6.8.0
Method com.aspose.barcode.BarCodeBuilder.setRows() is updated
Updated method com.aspose.barcode.BarCodeBuilder.setRows(). Now this method allows to specify number of rows for new symbology DatabarExpandedStacked. If setting is illegal then rows will be calculated automatically.
BarCodeBuilder builder = new BarCodeBuilder(
"(01)90012345678908(3932)04066USD778899",
Symbology.DatabarExpandedStacked);
builder.setRows(1);
builder.save("stacked1Rows.png");
Field com.aspose.barcode.Symbology.DatabarExpandedStacked is added
It specifies that the data should be encoded with Databar expanded stacked barcode specification.
// Initialize BarCodeBuilder class object
BarCodeBuilder builder = new BarCodeBuilder();
// Set code text
builder.setCodeText("(01)90012345678908(3932)04055GBP");
// Set symbology type
builder.setSymbologyType(Symbology.DatabarExpandedStacked);
// Save barcode image
builder.save("databarexpandedstacked.png");
Field com.aspose.barcode.Symbology.DatabarStacked is added
It specifies that the data should be encoded with Databar stacked barcode specification.
// Initialize BarCodeBuilder class object
BarCodeBuilder builder = new BarCodeBuilder();
// Set code text
builder.setCodeText("(01)00012345678905");
// Set symbology type
builder.setSymbologyType(Symbology.DatabarStacked);
// Save barcode image
builder.save("databarstacked.png");
Field com.aspose.barcode.Symbology.DatabarStackedOmniDirectional is added
It specifies that the data should be encoded with Databar stacked omni-directional barcode specification.
// Initialize BarCodeBuilder class object
BarCodeBuilder builder = new BarCodeBuilder();
// Set code text
builder.setCodeText("(01)00034567890125");
// Set symbology type
builder.setSymbologyType(Symbology.DatabarStackedOmniDirectional);
// Save barcode image
builder.save("databarstackedomnidirectional.png");
Field com.aspose.barcoderecognition.BarCodeReadType.DatabarExpandedStacked is added
Added support for Databar expanded stacked recognition.
// Initialize BarCodeReader class
BarCodeReader reader = new BarCodeReader("databarexpandedstacked.png", BarCodeReadType.DatabarExpandedStacked);
// scan barcode image
if (reader.read())
{
System.out.println(reader.getCodeText());
}
Field com.aspose.barcoderecognition.BarCodeReadType.DatabarStacked is added
Added support for Databar stacked recognition.
// Initialize BarCodeReader class
BarCodeReader reader = new BarCodeReader("databarstacked.png", BarCodeReadType.DatabarStacked);
// scan barcode image
if (reader.read())
{
System.out.println(reader.getCodeText());
}
Field com.aspose.barcoderecognition.BarCodeReadType.DatabarStackedOmniDirectional is added
Added support for Databar stacked omni-directional recognition.
// Initialize BarCodeReader class
BarCodeReader reader = new BarCodeReader("databarstackedomnidirectional.png", BarCodeReadType.DatabarStackedOmniDirectional);
// scan barcode image
if (reader.read())
{
System.out.println(reader.getCodeText());
}
Field Symbology.PatchCode is added
We’ve added encoding support of Patch code symbology, whereas decoding capability is already present.
BarCodeBuilder builder = new BarCodeBuilder("Patch T", Symbology.PatchCode);
builder.save("PatchCode.png");
Filter ImageBinarization.LineCodesRestoration is added
We’ve added a new Line Codes Restoration filter. This filter restores corrupted strokes for 1D barcodes. This degradation could come from dirty, dusty products or discarded barcode resulting in touched or missing parts of the bars.
// Create an instance of BarCodeReader and set image and symbology type to recognize
BarCodeReader reader = new BarCodeReader(@"c:\temp\MyBarcode.png", BarCodeReadType.Code39Standard);
// Set grayscale image processing
reader.setImageBinarizationHints(ImageBinarization.LineCodesRestoration);
// Try to recognize all possible barcodes in the image
while (reader.read())
{
// Display the codetext
System.out.println("Codetext: " + reader.getCodeText());
}
// Close the reader
reader.close();
Filter ImageBinarization.Grayscale is removed
We’ve removed GrayScale filter.