IRONSOFTWAREHOME
Set Barcode Reader Options
using IronBarCode;

BarcodeReaderOptions myOptionsExample = new BarcodeReaderOptions()
{
    // Choose a reading speed from: Faster, Balanced, Detailed, ExtremeDetail
    // There is a tradeoff in performance as more detail is set
    Speed = ReadingSpeed.Balanced,

    // Reader will stop scanning once a single barcode is found (if set to true)
    ExpectMultipleBarcodes = true,

    // By default, all barcode formats are scanned for
    // Specifying a subset of barcode types to search for would improve performance
    ExpectBarcodeTypes = BarcodeEncoding.AllOneDimensional,

    // Utilize multiple threads to read barcodes from multiple images in parallel
    Multithreaded = true,

    // Maximum threads for parallelized barcode reading
    // Default is 4
    MaxParallelThreads = 2,

    // The area of each image frame in which to scan for barcodes
    // Specifying a crop area will significantly improve performance and avoid noisy parts of the image
    CropArea = new System.Drawing.Rectangle(),

    // Special setting for Code39 barcodes
    // If a Code39 barcode is detected, try to read with both the base and extended ASCII character sets
    UseCode39ExtendedMode = true,

    // Minimum scan lines that must agree on a result for it to be valid
    // Default is 2. Set to 1 for thin or low-quality barcodes
    MinScanLines = 1
};
Imports IronBarCode

Dim myOptionsExample As New BarcodeReaderOptions() With {
    .Speed = ReadingSpeed.Balanced,
    .ExpectMultipleBarcodes = True,
    .ExpectBarcodeTypes = BarcodeEncoding.AllOneDimensional,
    .Multithreaded = True,
    .MaxParallelThreads = 2,
    .CropArea = New System.Drawing.Rectangle(),
    .UseCode39ExtendedMode = True,
    .MinScanLines = 1
}
NuGet Download
PM > Install-Package BarCode
Set Barcode Reader Options

Set Barcode Reader Options

IronBarcode offers a range of settings within the BarcodeReaderOptions class to enable tailored and optimized barcode reading. These options allow you to trade-off resources for accuracy, control the reading scope, and optimize reading strategies.

Available BarcodeReaderOptions Types

  • BarcodeReaderOptions: This class provides options to customize the reading of barcodes, making the process more efficient and accurate based on specific needs.
  • ExpectMultipleBarcodes: By setting this to false, the reader will stop after finding the first barcode, improving performance when only one barcode is expected.
  • ExpectBarcodeTypes: Specifies which BarcodeEncoding types to scan for, simplifying the process when you have varied barcode formats.
  • CropArea: Allows focusing on a specific area of the image, which can significantly improve reading times and accuracy when the barcode position is approximately known.
  • MaxParallelThreads: Specifies the maximum number of threads to be used in parallel, enhancing performance on systems with multiple CPU cores.
  • MinScanLines: Sets the minimum number of scan lines that must agree on a barcode result for it to be considered valid. The default is 2. Lowering it to 1 increases sensitivity for thin or low-quality barcodes, while increasing it reduces false positives.

This configuration offers a balance between resource use, speed, and accuracy, tailored to your specific barcode reading needs.

Learn to Read Barcodes from Images with IronBarcode
View on GitHub

Ready to Get Started?

Nuget Downloads 2,422,100Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required