This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/dotnet/barcodes/read-scan/read-1d-barcode-from-image.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Reading 1D barcodes from images | Nutrient .NET SDK

This guide demonstrates how to read one-dimensional (1D) barcode values from an image.

Use this workflow when you need to:

  • Extract product or shipment identifiers from barcode images
  • Support inventory, checkout, or logistics pipelines
  • Process one or more barcodes from a single file

Implementation

The workflow loads an image, runs a barcode scan, and reads detected values:

using GdPicture14;
LicenseManager licence = new LicenseManager();
licence.RegisterKEY(""); // Set a demo key
using GdPictureImaging imaging = new GdPictureImaging();
int imageId = imaging.CreateGdPictureImageFromFile(@"input_barcode_1d.png");
imaging.Barcode1DReaderDoScan(imageId);
int barcodesCount = imaging.Barcode1DReaderGetBarcodeCount();
string barcodeValue = imaging.Barcode1DReaderGetBarcodeValue(1);

Supported barcode types

The SDK supports common 1D formats, including:

  • Code 128
  • Code 39
  • UPC-A and UPC-E
  • EAN-13 and EAN-8
  • Code 93
  • Interleaved 2 of 5

Notes

  • Use Barcode1DReaderGetBarcodeCount() to check how many barcodes the scan found.
  • Use Barcode1DReaderGetBarcodeValue(index) to retrieve each barcode value by index.
  • Add status checks in production code to handle image load and scan failures.

Conclusion

This workflow scans an image for 1D barcodes and reads decoded values for downstream business logic.