ClearImage.BarcodeReader.IP 12.0.7675

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package ClearImage.BarcodeReader.IP --version 12.0.7675
NuGet\Install-Package ClearImage.BarcodeReader.IP -Version 12.0.7675
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ClearImage.BarcodeReader.IP" Version="12.0.7675" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ClearImage.BarcodeReader.IP --version 12.0.7675
#r "nuget: ClearImage.BarcodeReader.IP, 12.0.7675"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ClearImage.BarcodeReader.IP as a Cake Addin
#addin nuget:?package=ClearImage.BarcodeReader.IP&version=12.0.7675

// Install ClearImage.BarcodeReader.IP as a Cake Tool
#tool nuget:?package=ClearImage.BarcodeReader.IP&version=12.0.7675

ClearImage SDK

ClearImage SDK a development toolkit to add barcode recognition to your application. Develop a Web Service, console, or desktop application in a language of your choice, including C#, C++, Java, PHP, and others. Deploy your application to your preferred target or device, including a physical computer, Cloud VM, container, or microservice.

Read 1D barcodes from a page

This example reads code 39 and code 128 barcodes. Set barcode types used in your application. Setting reader.Auto1D=true; automatically finds barcode type, but it is slower and is not recommended for production.

using Inlite.ClearImageNet;

void ReadBarcode1D_page(string fileName, int page) {
    try {
        using(BarcodeReader reader = new BarcodeReader()) {
            reader.Code39 = true; reader.Code128 = true; 
            // reader.Auto1D = true;
            Barcode[] barcodes = reader.Read(fileName, page);
            foreach(Barcode barcode in barcodes)
                Console.WriteLine($"Barcode type: {barcode.Type}   Text: {barcode.Text}");
            }
        }
    catch(Exception ex) { Console.WriteLine("Exception: " + ex.ToString()); }
    }

Read 2D Barcode from a page

This example reads PDF417, DataMatrix, and QR code. 2D barcodes might contain binary data available in Barcode.Data property.

using Inlite.ClearImageNet;

void ReadBarcode2D_page(string fileName, int page) {
    try {
        using(BarcodeReader reader = new BarcodeReader()) {
            reader.Pdf417 = true;  // <= Read PDF417 barcodes
            // reader.DataMatrix = true;
            // reader.QR = true;
            Barcode[] barcodes = reader.Read(fileName, page);
            foreach(Barcode barcode in barcodes) 
                Console.WriteLine($"Barcode type: {barcode.Type}   Text: {barcode.Text}");
            }
        }
    catch(Exception ex) { Console.WriteLine("Exception: " + ex.ToString()); }
    }

Read Postal Barcodes from a page

This example reads Postal Barcodes from an image file page.

using Inlite.ClearImageNet;

void ReadPostal_page(string fileName, int page) {
    try {
        using(BarcodeReader reader = new BarcodeReader()) {
            reader.FourState = true;  //  <= Read postal barcodes
            Barcode[] barcodes = reader.Read(fileName, page);
            foreach(Barcode barcode in barcodes) {
                switch(barcode.Type) {
                    case BarcodeType.UspsIntelligentMail:
                        Console.Write(" US Intelligent Mail"); break;
                    case BarcodeType.BpoPostcode:
                        Console.Write("UK Royal Mail"); break;
                    case BarcodeType.AustralianPost:
                        Console.Write("Australian Mail"); break;
                    case BarcodeType.SingaporePost:
                        Console.Write("Singapore Mail"); break;
                    case BarcodeType.FourState:
                        Console.Write("ForState "); break;
                    }
                Console.WriteLine("   Text: " + barcode.Text);
                }
            }
        }
    catch(Exception ex) { Console.WriteLine("Exception: " + ex.ToString()); }
    }

Read Driver's License barcode

This example reads the Driver's License barcode from an image file page.

using Inlite.ClearImageNet;

void ReadDriverLicBarcode_page(string fileName, int page) {
    try {
        using(BarcodeReader reader = new BarcodeReader()) {
            reader.DrvLicID = true;  
            Barcode[] barcodes = reader.Read(fileName, page);
            foreach(Barcode barcode in barcodes) {
                Inlite.Data.DLDecoder decoder = new Inlite.Data.DLDecoder();
                if(decoder.Decode(text) != "") {
                    Console.WriteLine("last: " + decoder.last);
                    Console.WriteLine("first: " + decoder.first);
                    Console.WriteLine("middle: " + decoder.middle);
                    Console.WriteLine("dob: " + decoder.dob);
                    Console.WriteLine("eyes: " + decoder.eyes);
                    Console.WriteLine("hair: " + decoder.hair);
                    Console.WriteLine("sex: " + decoder.sex);
                    Console.WriteLine("height: " + decoder.height);
                    Console.WriteLine("street: " + decoder.street);
                    Console.WriteLine("city: " + decoder.city);
                    Console.WriteLine("state: " + decoder.state);
                    Console.WriteLine("postal: " + decoder.postal);
                    Console.WriteLine("country: " + decoder.country);
                    Console.WriteLine("id: " + decoder.id);
                    Console.WriteLine("issued: " + decoder.issued);
                    Console.WriteLine("expires: " + decoder.expires);
                    }
                }
            }
        }
    catch(Exception ex) { Console.WriteLine("Exception: " + ex.ToString()); }
    }

Read from a multi-page image file

This example reads barcodes from a single-page file or all pages of a multi-page image file.

using Inlite.ClearImageNet;

void ReadBarcode1D_file(string fileName) {
    try {
        using(BarcodeReader reader = new BarcodeReader()) {
            reader.Code39 = true; reader.Code128 = true;
            Barcode[] barcodes = reader.Read(fileName); // <== Read from all pages
            foreach(Barcode barcode in barcodes) 
                Console.WriteLine($"Barcode type: {barcode.Type}  Barcode page: {barcode.Page}  Text: {barcode.Text}");
            }
        }
    catch(Exception ex) { Console.WriteLine("Exception: " + ex.ToString()); }
    }

Read from a stream

This example reads barcodes from a stream. The stream contains the content of a single image file. For example, if a file is stored in a database.

using Inlite.ClearImageNet;

void ReadBarcode1D_stream(Stream stream) {
    try {
        using(BarcodeReader reader = new BarcodeReader()) {
            reader.Code39 = true; reader.Code128 = true;
            Barcode[] barcodes = reader.Read(stream); // <== read from a stream
            foreach(Barcode barcode in barcodes) 
                Console.WriteLine($"Barcode type: {barcode.Type}  Barcode page: {barcode.Page}  Text: {barcode.Text}");
            }
        }
    catch(Exception ex) { Console.WriteLine("Exception: " + ex.ToString()); }
    }

Image Processing - Repair image page

This example uses some of the most popular image-processing functions. In a production application, the specific sequence of functions should be selected based on specific application needs. 

using Inlite.ClearImageNet;

static void RepairPage(ImageEditor editor) {
    editor.AutoDeskew();
    editor.AutoRotate();
    editor.AutoCrop(10, 10, 10, 10);     // Crop to 10 pixels on each side
    // editor.AdvancedBinarize();        // Convert to bi-tonal an image with complex background patterns
    editor.ToBitonal();
    editor.BorderExtract(BorderExtractMode.deskewCrop); // Deskew and crop based on black border
    editor.RemovePunchHoles();
    editor.SmoothCharacters();
    editor.CleanNoise(3);               // Clean black noise of 3 pixels
    // editor.CleanNoise    // Clean black and white noise            
    //    (CleanNoiseFlags.black | CleanNoiseFlags.white, 3, 3, 10); 
    editor.ReconstructLines(LineDirection.horzAndVert);
    }

void Repair_page(string fileName, int page, string fileOut) {
    try {
        using(ImageEditor editor = new ImageEditor()) {
            editor.Image.Open(fileName, page);
            // Do image repair
            RepairPage(editor);
            // Save results
            editor.Image.SaveAs(fileOut, Inlite.ClearImage.EFileFormat.ciEXT);
            }
        }
    catch(Exception ex) { Console.WriteLine("Exception: " + ex.ToString()); }
    }

Image Processing - Repair all images in a multi-page file

This example repairs all images in a multi-page file and saves the result in the fileOut file.

using Inlite.ClearImageNet;

private static void _OnEditPage(object sender, EditPageEventArgs e) {
    // e.cancel = true;    // Abort file processing 
    // e.skipPage = true;  // Remove this page from the output
    RepairPage(e.Editor);  // See this method in a single page example
    }

void Repair_file(string fileName, string fileOut) {
    try {
        using(ImageEditor editor = new ImageEditor()) {
            bool ret = editor.Edit(fileName, _OnEditPage, fileOut, ImageFileFormat.outputFileExtension, true);
            }
        }
    catch(Exception ex) { Console.WriteLine("Exception: " + ex.ToString()); }
    }

Image Processing - Repair all images in a stream

This example repairs all images in an input stream and saves the output stream using a specified file format. Streams contain the content of a single image file. For example, if a file is stored in a database.

using Inlite.ClearImageNet;

private static void _OnEditPage(object sender, EditPageEventArgs e) {
    RepairPage(e.Editor);  // See this method in a single page example
    }

Stream Repair_stream(Stream stream, ImageFileFormat output_format) {
    try {
        using(ImageEditor editor = new ImageEditor()) {
            MemoryStream msOut = editor.Edit(stream, _OnEditPage, output_format);
            return msOut;
            }
        }
    catch(Exception ex) { Console.WriteLine("Exception: " + ex.ToString()); return null; }
    }
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
12.0.7675 1,477 1/6/2024