Interface IQrInput
Defines the interface for QR input types that can be disposed.
Namespace: IronQr
Assembly: IronQr.dll
Syntax
public interface IQrInput
IQrInput is the input contract a QrReader reads from. QrReader.Read and ReadAsync accept any IQrInput, so the reader is decoupled from where the image actually comes from. The contract carries a QrScanMode property, the detection strategy applied to that input, and extends IDisposable so an implementation can release the image it holds.
The concrete implementor in IronQR is QrImageInput, which wraps an AnyBitmap loaded from a file, stream, or bytes. Most code uses QrImageInput directly and never names the interface, but a project with an unusual source (a custom frame grabber or a pooled buffer) can implement IQrInput to feed the reader without first materializing a standard bitmap. Either way, dispose the input after the read. Coding against the interface rather than the concrete type also keeps a reader easy to test, since a unit test can supply a stub IQrInput instead of a real image.
using IQrInput input = new QrImageInput(AnyBitmap.FromFile("qr.png"), QrScanMode.Auto);The read QR code example reads through an input, and the scan modes how-to sets the strategy.
Properties
QrScanMode
Define how IronQR scans and detects QR Codes in an image to read. By default, a ML model will scan the image, and a basic second scan will be run if the ML model finds none.
Declaration
QrScanMode QrScanMode { get; set; }
Property Value
| Type | Description |
|---|---|
| QrScanMode |