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# |
Copy Code |
---|---|
using (Bitmap bitmap = new Bitmap(imagePath)) { // Get barcode results by passing in Bitmap object. Result[] results = barcodeXpress.reader.Analyze(bitmap); } |
Set the barcode type by using the BarcodeTypes property.
C# |
Copy Code |
---|---|
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.