Barcode Xpress for .NET Core v13.9 - Updated
Acquire an Image for Barcode Recognition
Developer Guide > How To > Acquire an Image for Barcode Recognition

Image Options

Barcode Xpress works with 1-bit black and white images, 8-bit grayscale images, and 24-bit color images.

Barcode Xpress for .NET Core should process images in any format that can be loaded into a System.Drawing.Bitmap, such as GIF, JPEG, EXIF, TIF, and PNG.

On Linux, BMPs of version 4 and higher are only supported when libgdiplus 6.0.1 or higher is installed on the system.

C#

using (Bitmap bitmap = new Bitmap(imagePath))
{
    // Get barcode results by passing in Bitmap object.
    Result[] results = barcodeXpress.reader.Analyze(bitmap);
}

Setting Barcode Type

Set the barcode type by using the BarcodeTypes property.

C#

using (Bitmap bitmap = new Bitmap(imagePath))
{
    // Get barcode results by passing in a Bitmap object.
    barcodeXpress.reader.BarcodeTypes = new BarcodeType[] { 
    BarcodeType.QRCodeBarcode, BarcodeType.PDF417Barcode };
    Result[] results = barcodeXpress.reader.Analyze(bitmap);
}

Use the BarcodeType enum to set the BarcodeType array. See the Barcode Types page for more information and examples of each supported barcode type.

See Also

Recognize a Barcode

System Requirements

Access Results

Create a Barcode

Overview

Is this page helpful?
Yes No
Thanks for your feedback.