Search Results for

    Show / Hide Table of Contents

    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
    System.Object
    QRCodeWriter
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ToString()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: IronBarCode
    Assembly: IronBarCode.dll
    Syntax
    public static class QRCodeWriter

    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 = QRCodeWriter.QrErrorCorrectionLevel.Highest, 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 from 1-40. The default value 0 will automatticaly assign an appropriate QrVersion for your data (highly reccomended).

    Higher QrVersion numbers generate a more complex graphic and can encode more data. Lower QrVersion numbers generate simpler QR codes that may be more readable at a distance. If you decide to set a very low QrVersion, you may experience an IronBarCodeEncodingException if the size of data you are encoding exceeds the limits of that symbol version.

    Please read https://www.qrcode.com/en/about/version.html

    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 = QRCodeWriter.QrErrorCorrectionLevel.Highest, 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 from 1-40. The default value 0 will automatticaly assign an appropriate QrVersion for your data (highly reccomended).

    Higher QrVersion numbers generate a more complex graphic and can encode more data. Lower QrVersion numbers generate simpler QR codes that may be more readable at a distance. If you decide to set a very low QrVersion, you may experience an IronBarCodeEncodingException if the size of data you are encoding exceeds the limits of that symbol version.

    Please read https://www.qrcode.com/en/about/version.html

    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 = QRCodeWriter.QrErrorCorrectionLevel.Highest, 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 from 1-40. The default value 0 will automatticaly assign an appropriate QrVersion for your data (highly reccomended).

    Higher QrVersion numbers generate a more complex graphic and can encode more data. Lower QrVersion numbers generate simpler QR codes that may be more readable at a distance. If you decide to set a very low QrVersion, you may experience an IronBarCodeEncodingException if the size of data you are encoding exceeds the limits of that symbol version.

    Please read https://www.qrcode.com/en/about/version.html

    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[], String, Int32, Int32)

    Renders a QR code of given dimensions with a logo image at its center.

    Declaration
    public static GeneratedBarcode CreateQrCodeWithLogo(byte[] BinaryData, string LogoFilePath, int Size = 500, int QrVersion = 0)
    Parameters
    Type Name Description
    System.Byte[] BinaryData

    The value of the QR code as a byte array.

    System.String LogoFilePath

    The file path to the logo image.

    System.Int32 Size

    The width and height of the QR code in pixels.

    System.Int32 QrVersion

    The symbol version of the QR Code from 1-40. The default value 0 will automatticaly assign an appropriate QrVersion for your data (highly reccomended).

    Higher QrVersion numbers generate a more complex graphic and can encode more data. Lower QrVersion numbers generate simpler QR codes that may be more readable at a distance. If you decide to set a very low QrVersion, you may experience an IronBarCodeEncodingException if the size of data you are encoding exceeds the limits of that symbol version.

    Please read https://www.qrcode.com/en/about/version.html

    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, String, Int32, Int32)

    Renders a QR code of given dimensions with a logo image at its center.

    Declaration
    public static GeneratedBarcode CreateQrCodeWithLogo(Stream BinaryDataStream, string LogoFilePath, int Size = 500, int QrVersion = 0)
    Parameters
    Type Name Description
    System.IO.Stream BinaryDataStream

    The value of the QR code as a stream.

    System.String LogoFilePath

    The file path to the logo image.

    System.Int32 Size

    The width and height of the QR code in pixels.

    System.Int32 QrVersion

    The symbol version of the QR Code from 1-40. The default value 0 will automatticaly assign an appropriate QrVersion for your data (highly reccomended).

    Higher QrVersion numbers generate a more complex graphic and can encode more data. Lower QrVersion numbers generate simpler QR codes that may be more readable at a distance. If you decide to set a very low QrVersion, you may experience an IronBarCodeEncodingException if the size of data you are encoding exceeds the limits of that symbol version.

    Please read https://www.qrcode.com/en/about/version.html

    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, String, Int32, Int32)

    Renders a QR code of given dimensions with a logo image at its center.

    Declaration
    public static GeneratedBarcode CreateQrCodeWithLogo(string Value, string LogoFilePath, 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.

    System.String LogoFilePath

    The file path to the logo image.

    System.Int32 Size

    The width and height of the QR code in pixels.

    System.Int32 QrVersion

    The symbol version of the QR Code from 1-40. The default value 0 will automatticaly assign an appropriate QrVersion for your data (highly reccomended).

    Higher QrVersion numbers generate a more complex graphic and can encode more data. Lower QrVersion numbers generate simpler QR codes that may be more readable at a distance. If you decide to set a very low QrVersion, you may experience an IronBarCodeEncodingException if the size of data you are encoding exceeds the limits of that symbol version.

    Please read https://www.qrcode.com/en/about/version.html

    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.

    CreateQrCodeWithLogoBitmap(Byte[], Bitmap, Int32, Int32)

    Renders a QR code of given dimensions with a logo image at its center.

    Declaration
    public static GeneratedBarcode CreateQrCodeWithLogoBitmap(byte[] BinaryData, Bitmap LogoImage, int Size = 500, int QrVersion = 0)
    Parameters
    Type Name Description
    System.Byte[] BinaryData

    The value of the QR code as a byte array.

    System.Drawing.Bitmap LogoImage

    The logo image as a System.Drawing.Bitmap.

    System.Int32 Size

    The width and height of the QR code in pixels.

    System.Int32 QrVersion

    The symbol version of the QR Code from 1-40. The default value 0 will automatticaly assign an appropriate QrVersion for your data (highly reccomended).

    Higher QrVersion numbers generate a more complex graphic and can encode more data. Lower QrVersion numbers generate simpler QR codes that may be more readable at a distance. If you decide to set a very low QrVersion, you may experience an IronBarCodeEncodingException if the size of data you are encoding exceeds the limits of that symbol version.

    Please read https://www.qrcode.com/en/about/version.html

    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.

    CreateQrCodeWithLogoBitmap(Stream, Bitmap, Int32, Int32)

    Renders a QR code of given dimensions with a logo image at its center.

    Declaration
    public static GeneratedBarcode CreateQrCodeWithLogoBitmap(Stream BinaryDataStream, Bitmap LogoImage, int Size = 500, int QrVersion = 0)
    Parameters
    Type Name Description
    System.IO.Stream BinaryDataStream

    The value of the QR code as a stream.

    System.Drawing.Bitmap LogoImage

    The logo image as a System.Drawing.Bitmap.

    System.Int32 Size

    The width and height of the QR code in pixels.

    System.Int32 QrVersion

    The symbol version of the QR Code from 1-40. The default value 0 will automatticaly assign an appropriate QrVersion for your data (highly reccomended).

    Higher QrVersion numbers generate a more complex graphic and can encode more data. Lower QrVersion numbers generate simpler QR codes that may be more readable at a distance. If you decide to set a very low QrVersion, you may experience an IronBarCodeEncodingException if the size of data you are encoding exceeds the limits of that symbol version.

    Please read https://www.qrcode.com/en/about/version.html

    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.

    CreateQrCodeWithLogoBitmap(String, Bitmap, Int32, Int32)

    Renders a QR code of given dimensions with a logo image at its center.

    Declaration
    public static GeneratedBarcode CreateQrCodeWithLogoBitmap(string Value, Bitmap LogoImage, 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.

    System.Drawing.Bitmap LogoImage

    The logo image as a System.Drawing.Bitmap.

    System.Int32 Size

    The width and height of the QR code in pixels.

    System.Int32 QrVersion

    The symbol version of the QR Code from 1-40. The default value 0 will automatticaly assign an appropriate QrVersion for your data (highly reccomended).

    Higher QrVersion numbers generate a more complex graphic and can encode more data. Lower QrVersion numbers generate simpler QR codes that may be more readable at a distance. If you decide to set a very low QrVersion, you may experience an IronBarCodeEncodingException if the size of data you are encoding exceeds the limits of that symbol version.

    Please read https://www.qrcode.com/en/about/version.html

    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.

    CreateQrCodeWithLogoImage(Byte[], Image, Int32, Int32)

    Renders a QR code of given dimensions with a logo image at its center.

    Declaration
    public static GeneratedBarcode CreateQrCodeWithLogoImage(byte[] BinaryData, Image LogoImage, int Size = 500, int QrVersion = 0)
    Parameters
    Type Name Description
    System.Byte[] BinaryData

    The value of the QR code as a byte array.

    System.Drawing.Image LogoImage

    The logo image as a System.Drawing.Image.

    System.Int32 Size

    The width and height of the QR code in pixels.

    System.Int32 QrVersion

    The symbol version of the QR Code from 1-40. The default value 0 will automatticaly assign an appropriate QrVersion for your data (highly reccomended).

    Higher QrVersion numbers generate a more complex graphic and can encode more data. Lower QrVersion numbers generate simpler QR codes that may be more readable at a distance. If you decide to set a very low QrVersion, you may experience an IronBarCodeEncodingException if the size of data you are encoding exceeds the limits of that symbol version.

    Please read https://www.qrcode.com/en/about/version.html

    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.

    CreateQrCodeWithLogoImage(Stream, Image, Int32, Int32)

    Renders a QR code of given dimensions with a logo image at its center.

    Declaration
    public static GeneratedBarcode CreateQrCodeWithLogoImage(Stream BinaryDataStream, Image LogoImage, int Size = 500, int QrVersion = 0)
    Parameters
    Type Name Description
    System.IO.Stream BinaryDataStream

    The value of the QR code as a stream.

    System.Drawing.Image LogoImage

    The logo image as a System.Drawing.Image.

    System.Int32 Size

    The width and height of the QR code in pixels.

    System.Int32 QrVersion

    The symbol version of the QR Code from 1-40. The default value 0 will automatticaly assign an appropriate QrVersion for your data (highly reccomended).

    Higher QrVersion numbers generate a more complex graphic and can encode more data. Lower QrVersion numbers generate simpler QR codes that may be more readable at a distance. If you decide to set a very low QrVersion, you may experience an IronBarCodeEncodingException if the size of data you are encoding exceeds the limits of that symbol version.

    Please read https://www.qrcode.com/en/about/version.html

    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.

    CreateQrCodeWithLogoImage(String, Image, Int32, Int32)

    Renders a QR code of given dimensions with a logo image at its center.

    Declaration
    public static GeneratedBarcode CreateQrCodeWithLogoImage(string Value, Image LogoImage, 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.

    System.Drawing.Image LogoImage

    The logo image as a System.Drawing.Image.

    System.Int32 Size

    The width and height of the QR code in pixels.

    System.Int32 QrVersion

    The symbol version of the QR Code from 1-40. The default value 0 will automatticaly assign an appropriate QrVersion for your data (highly reccomended).

    Higher QrVersion numbers generate a more complex graphic and can encode more data. Lower QrVersion numbers generate simpler QR codes that may be more readable at a distance. If you decide to set a very low QrVersion, you may experience an IronBarCodeEncodingException if the size of data you are encoding exceeds the limits of that symbol version.

    Please read https://www.qrcode.com/en/about/version.html

    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.

    ☀
    ☾
    In This Article
    Back to top
    Install with Nuget