Class QRCodeWriter
A class allowing for advanced control on the generation of QR type barcodes.
QRCodeWriter gives the developer access to set QR code error correction levels, and to add logo images to QR codes.
Generated Barcodes can be exported as Images, Bitmaps, Files and Streams.
Inheritance
Namespace: IronBarCode
Assembly: IronBarCode.dll
Syntax
public static class QRCodeWriter : Object
Methods
CreateQrCode(Byte[], Int32, QRCodeWriter.QrErrorCorrectionLevel, Int32)
Renders a QR code.
Overload methods and methods of the created GeneratedBarcode object allow for barcode sizes and colors to be customized. Logos & Branding may also be added using the CreateQrCodeWithLogo method.
Declaration
public static GeneratedBarcode CreateQrCode(byte[] binaryData, int size = 500, QRCodeWriter.QrErrorCorrectionLevel errorCorrection, int qrVersion = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | binaryData | The value of the QR code as a byte array. |
System.Int32 | size | The width and height of the QR code in pixels. |
QRCodeWriter.QrErrorCorrectionLevel | errorCorrection | The error correction level of the QR code. |
System.Int32 | qrVersion | The symbol version of the QR Code. The default value 0 will automatically assign an appropriate QR version for your data (highly recommended). |
Returns
Type | Description |
---|---|
GeneratedBarcode | A GeneratedBarcode object for the QR code which can be manipulated, annotated and saved to a System.Drawing.Image, an object, image file, PDF, MediaURL or data stream. |
CreateQrCode(Stream, Int32, QRCodeWriter.QrErrorCorrectionLevel, Int32)
Renders a QR code.
Overload methods and methods of the created GeneratedBarcode object allow for barcode sizes and colors to be customized. Logos & Branding may also be added using the CreateQrCodeWithLogo method.
Declaration
public static GeneratedBarcode CreateQrCode(Stream binaryDataStream, int size = 500, QRCodeWriter.QrErrorCorrectionLevel errorCorrection, int qrVersion = 0)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | binaryDataStream | The value of the QR code as a stream. |
System.Int32 | size | The width and height of the QR code in pixels. |
QRCodeWriter.QrErrorCorrectionLevel | errorCorrection | The error correction level of the QR code. |
System.Int32 | qrVersion | The symbol version of the QR Code. The default value 0 will automatically assign an appropriate QR version for your data (highly recommended). |
Returns
Type | Description |
---|---|
GeneratedBarcode | A GeneratedBarcode object for the QR code which can be manipulated, annotated and saved to a System.Drawing.Image, an object, image file, PDF, MediaURL or data stream. |
CreateQrCode(String, Int32, QRCodeWriter.QrErrorCorrectionLevel, Int32)
Renders a QR code from a String of data. UTF-8 fully supported.
Overload methods and methods of the created GeneratedBarcode object allow for barcode sizes and colors to be customized. Logos / Branding may also be added.
Declaration
public static GeneratedBarcode CreateQrCode(string value, int size = 500, QRCodeWriter.QrErrorCorrectionLevel errorCorrection, int qrVersion = 0)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The value of the QR code as a string. Also suitable for URLS. |
System.Int32 | size | The width and height of the QR code in pixels. |
QRCodeWriter.QrErrorCorrectionLevel | errorCorrection | The error correction level of the QR code. |
System.Int32 | qrVersion | The symbol version of the QR Code. The default value 0 will automatically assign an appropriate QR version for your data (highly recommended). |
Returns
Type | Description |
---|---|
GeneratedBarcode | A GeneratedBarcode object for the QR code which can be manipulated, annotated and saved to a System.Drawing.Image, an object, image file, PDF, MediaURL or data stream. |
CreateQrCodeWithLogo(Byte[], QRCodeLogo, Int32, Int32)
Renders a QR code of given dimensions with a logo image at its center.
Declaration
public static GeneratedBarcode CreateQrCodeWithLogo(byte[] binaryData, QRCodeLogo qrCodeLogo, int size = 500, int qrVersion = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | binaryData | The value of the QR code as a byte array. |
QRCodeLogo | qrCodeLogo | A QRCodeLogo class instance representing your desired logo image settings. |
System.Int32 | size | The width and height of the QR code in pixels. |
System.Int32 | qrVersion | The symbol version of the QR Code. The default value 0 will automatically assign an appropriate QR version for your data (highly recommended). |
Returns
Type | Description |
---|---|
GeneratedBarcode | A GeneratedBarcode object for the QR code which can be manipulated, annotated and saved to a System.Drawing.Image, an object, image file, PDF, MediaURL or data stream. |
CreateQrCodeWithLogo(Stream, QRCodeLogo, Int32, Int32)
Renders a QR code of given dimensions with a logo image at its center.
Declaration
public static GeneratedBarcode CreateQrCodeWithLogo(Stream binaryDataStream, QRCodeLogo qrCodeLogo, int size = 500, int qrVersion = 0)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | binaryDataStream | The value of the QR code as a stream. |
QRCodeLogo | qrCodeLogo | A QRCodeLogo class instance representing your desired logo image settings. |
System.Int32 | size | The width and height of the QR code in pixels. |
System.Int32 | qrVersion | The symbol version of the QR Code. The default value 0 will automatically assign an appropriate QR version for your data (highly recommended). |
Returns
Type | Description |
---|---|
GeneratedBarcode | A GeneratedBarcode object for the QR code which can be manipulated, annotated and saved to a System.Drawing.Image, an object, image file, PDF, MediaURL or data stream. |
CreateQrCodeWithLogo(String, QRCodeLogo, Int32, Int32)
Renders a QR code of given dimensions with a logo image at its center.
Declaration
public static GeneratedBarcode CreateQrCodeWithLogo(string value, QRCodeLogo qrCodeLogo, int size = 500, int qrVersion = 0)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The value of the QR code as a string. Also suitable for URLS. |
QRCodeLogo | qrCodeLogo | A QRCodeLogo class instance representing your desired logo image settings. |
System.Int32 | size | The width and height of the QR code in pixels. |
System.Int32 | qrVersion | The symbol version of the QR Code. The default value 0 will automatically assign an appropriate QR version for your data (highly recommended). |
Returns
Type | Description |
---|---|
GeneratedBarcode | A GeneratedBarcode object for the QR code which can be manipulated, annotated and saved to a System.Drawing.Image, an object, image file, PDF, MediaURL or data stream. |