Search Results for

    Show / Hide Table of Contents

    Class BarcodeResults

    Collection of barcode reading results.

    Inheritance
    System.Object
    BarcodeResults
    Namespace: IronBarCode
    Assembly: IronBarCode.dll
    Syntax
    public class BarcodeResults : List<BarcodeResult>

    BarcodeResults is the collection a BarcodeReader.Read call hands back, holding every BarcodeResult found in a source. It is a List<BarcodeResult>, so a developer iterates it with foreach and uses the usual list members directly, while a few extra members make whole-batch work easier. This is what a developer receives from any read, whether the image held one code or several.

    Because it derives from List<BarcodeResult>, the collection supports indexing, Count, and iteration out of the box, so reading each decoded Value is a plain loop. On top of that, Values returns a string[] of every decoded value in one step, handy when only the text is needed and the per-code geometry is not. FilterImages exposes the processed images IronBarcode worked from as an AnyBitmap[], and ExportFilterImagesToDisk writes those images to a folder, which is useful for inspecting why a difficult scan did or did not detect a code. Iterate the collection for full per-code detail, or read Values when a flat list of decoded strings is all a job needs.

    BarcodeResults results = BarcodeReader.Read("page.png");
    string[] values = results.Values;

    The read multiple barcodes how-to iterates a multi-code result, and the read barcodes from images how-to consumes the collection from a single read.

    Methods

    ExportFilterImagesToDisk(String)

    Exports all intermediate images generated during the filtering process to disk.

    Declaration
    public void ExportFilterImagesToDisk(string filename)
    Parameters
    Type Name Description
    System.String filename

    Filename to export to disk.

    Remarks

    All image files will contain "-i" appended to the end of the filename before the extension, where "i" represents the index of the applied filter.

    CacheAtEachIteration of ImageFilterCollection in BarcodeReaderOptions must be set to true for filtered images to be generated. If BarcodeReaderOptions is not passed in, they are generated by default.

    FilterImages()

    Returns all intermediate images generated during the filtering process.

    Declaration
    public AnyBitmap[] FilterImages()
    Returns
    Type Description
    IronSoftware.Drawing.AnyBitmap[]
    Remarks

    CacheAtEachIteration of ImageFilterCollection in BarcodeReaderOptions must be set to true for filtered images to be generated. If BarcodeReaderOptions is not passed in, they are generated by default.

    Values()

    Returns all values of the BarcodeResult collection.

    Declaration
    public string[] Values()
    Returns
    Type Description
    System.String[]
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget