Click or drag to resize

BarcodeReaderReadASingleBarcodeInCropArea Method (String, Rectangle, BarcodeEncoding, BarcodeReaderBarcodeRotationCorrection, BarcodeReaderBarcodeImageCorrection)

Reads a single barcode from an image from a specific rectangular area within an image or PDF. Setting a CropArea improves specificity and performance. Features granular settings for developer control to balance performance against accuracy for their given use case.

Overloads of this method accept InputImage as string file paths as well as Image, Bitmap and Stream types.

Namespace:  IronBarCode
Assembly:  IronBarCode (in IronBarCode.dll) Version: (
public static BarcodeResult ReadASingleBarcodeInCropArea(
	string InputImage,
	Rectangle CropArea,
	BarcodeEncoding BarcodeFormat = BarcodeEncoding.All,
	BarcodeReaderBarcodeRotationCorrection RotationCorrection = BarcodeReaderBarcodeRotationCorrection.Low,
	BarcodeReaderBarcodeImageCorrection ImageCorrection = BarcodeReaderBarcodeImageCorrection.None


Type: SystemString
The input image as a string file path. Jpeg, Jpeg2000, Png, Bmp, TiIf & Gif Image formats are supported.
Type: System.DrawingRectangle
The area of the image in which to search. A Rectangle measured in pixels.
BarcodeFormat (Optional)
Type: IronBarCodeBarcodeEncoding
The barcode encoding types to read from the InputImage. By default all supported barcodes types are scanned for. Choosing one or more specific Barcode formats will improve performance significantly.
RotationCorrection (Optional)
Type: IronBarCodeBarcodeReaderBarcodeRotationCorrection
Setting to allow the barcode reader to detect and accurately read barcodes which are rotated or skewed with perspective using a Hough Transform. Default tolerance is 10 Degrees of rotation; higher levels use more CPU.
ImageCorrection (Optional)
Type: IronBarCodeBarcodeReaderBarcodeImageCorrection
Setting which can clean noisy input images by allowing barcodes to be distinguished from the rest of the image. CPU Intensive.

Return Value

Type: BarcodeResult
A BarcodeResult, or null if no barcode was found.
See Also