Aspose.BarCode for .NET 7.8.0 Release Notes

Features and Improvements

KeySummaryCategory
BARCODENET-34399Add a manual hint “SkipRotatedBarcodes”New Feature
BARCODENET-34368Add new BarCode type: MICR (only reader)New Feature
BARCODENET-34364Add new BarCode type: Datalogic2of5New Feature
BARCODENET-34363Add new BarCode type: Code32New Feature
BARCODENET-34415Unable to recognize PDF417 barcodeEnhancement
BARCODENET-34411System.OutOfMemoryException thrown for a specific PDF documentEnhancement
BARCODENET-34403Incorrect Path IV recognitionEnhancement
BARCODENET-34402Recognize DataMatrix barcode with small module and a blurEnhancement
BARCODENET-34400Unable to read PDF417 barcode with a data length of 650 charactersEnhancement
BARCODENET-34397Support the API with more than 64 barcode typesEnhancement
BARCODENET-34386Can’t recognize sample Aztec from specificationEnhancement
BARCODENET-34373Can’t recognize Aztec with a lot of dataEnhancement
BARCODENET-33818Can’t recognize DataMatrix code from a PNG imageEnhancement

Public API and Backward Incompatible Changes

Enum BarCodeReadType has been marked as [OBSOLETE]

Since enum BarCodeReadType allows us to support only first 62 symbologies, new type has been added, and it is highly recommended to use new type called DecodeType instead.

BarCodeReadType will have been unavailable within two months term.

New types have been added to support more BarCode types

DecodeType, BaseDecodeType, SingleDecodeType, MultyDecodeType

These types will be further used in BarCodeReader instead of BarCodeReadType.

Create single decode type

 [C#]

SingleDecodeType singleType = DecodeType.QR
 [VB.NET]

Dim singleType As SingleDecodeType

singleType = DecodeType.QR

Creates compound MultyDecode types that combine SingleDecodeType and MultiDecode types.

 [C#]

MultyDecodeType types1 = new MultyDecodeType(DecodeType.QR, DecodeType.DataMatrix);

MultyDecodeType types2 = new MultyDecodeType(types1, DecodeType.Code128, DecodeType.Code39Standard);
 [VB.NET]

Dim multyType1 As MultyDecodeType

multyType1 = New MultyDecodeType(DecodeType.QR, DecodeType.DataMatrix)

Dim multyType2 As MultyDecodeType

multyType2 = New MultyDecodeType(multyType1, DecodeType.Code128, DecodeType.Code39Standard)

Namespaces have been updated

Public Namespaces have been re-arranged according to Microsoft guidelines.

The namespace Aspose.BarCodeRecognition has been replaced with Aspose.BarCode.BarCodeRecognition; BarCode.Common has been replaces with Aspose.BarCode.Common.

Thus, the namespaces Aspose.BarCodeRecognition, BarCode.Common are not available anymore.

BARCODENET-34399 Add a manual hint “SkipRotatedBarcodes”

New manual hint has been added to the available API: SkipRotatedBarcodes

It turns off rotation algorithms, and  therefore, increases the recognition speed. It is available only for Datamatrix and the linear barcodes.Code sample

 Stopwatch watch = new Stopwatch();

string filename = @"Datamatrix12.jpg";

using (BarCodeReader reader = new BarCodeReader(filename, BarCodeReadType.GS1DataMatrix))

{

	Console.WriteLine("Skip rotated barcodes");

	watch.Start();

	reader.RecognitionMode = RecognitionMode.ManualHints;

	reader.ManualHints = ManualHint.SkipRotatedBarcodes;

	while (reader.Read())

	{

		Console.WriteLine(reader.GetReadType() + ": " + reader.GetCodeText() + " QA:" + reader.GetRecognitionQuality());

	}

	watch.Stop();

	Console.WriteLine("Time: " + watch.ElapsedMilliseconds + "ms.");

	Console.WriteLine();

}

using (BarCodeReader reader = new BarCodeReader(filename, BarCodeReadType.GS1DataMatrix))

{

	Console.WriteLine("Not skip rotated barcodes");

	watch = new Stopwatch();

	watch.Start();

	while (reader.Read())

	{

		Console.WriteLine(reader.GetReadType() + ": " + reader.GetCodeText() + " QA:" + reader.GetRecognitionQuality());

	}

	watch.Stop();

	Console.WriteLine("Time: " + watch.ElapsedMilliseconds + "ms.");

}

Result:

 Skip rotated barcodes

DataMatrix: Wikipedia on erinomainen tietosanakirja, josta löytyy paljon tietoa mm. viivakoodeista. QA:0

Time: 116ms.


Not skip rotated barcodes

DataMatrix: Wikipedia on erinomainen tietosanakirja, josta löytyy paljon tietoa mm. viivakoodeista. QA:0

Time: 436ms.

BARCODENET-34368 Add new BarCode type: MICR (only reader)

New barcode type MICR has been added*.*

It is available only as a feature of BarCodeReader class.Code sample

 using (BarCodeReader reader = new BarCodeReader("MICR.jpg", BarCodeReadType.MicrE13B))

{

	while (reader.Read())

	{

		Console.WriteLine(reader.GetReadType() + ": " + reader.GetCodeText());

	}

}

Result:

 A011234567A001234567C243

BARCODENET-34364 Add new BarCode type: Datalogic2of5Code

Code sample (Generate)

 BarCodeBuilder builder = new BarCodeBuilder("8500060000", Symbology.DataLogic2of5);

            builder.Save("DataLogic2of5.png");

Code sample (Recognize)

 using (BarCodeReader reader = new BarCodeReader("DataLogic2of5.png", DecodeType.DataLogic2of5))

{

    while (reader.Read())

    {

        Console.WriteLine(reader.GetDecodeType() + ": " + reader.GetCodeText());

    }

}

Result:

 DataLogic2of5: 8500060000

BARCODENET-34363 Add new BarCode type: Code32

New barcode type Code32 has been added.Code sample (Generate)

 BarCodeBuilder builder = new BarCodeBuilder("123456788", Symbology.Code32);

builder.Save("code32.png");

Code sample (Recognize)

 using (BarCodeReader reader = new BarCodeReader("code32.png", BarCodeReadType.Code32))

{

	while (reader.Read())

	{

		Console.WriteLine(reader.GetReadType() + ": " + reader.GetCodeText());

	}

}

Result:

  Code32: 123456788