Search Results for

    Show / Hide Table of Contents

    Class QRCodeLogo

    A class allowing for advanced control on the logo of QR type barcodes.

    QRCodeLogo gives the developer access to set logo image, logo width, logo height, and rounded logo corner.

    Logo image can be provide as IronSoftware.Drawing.AnyBitmap, Files, Array of System.Byte and System.IO.Stream.

    Inheritance
    System.Object
    QRCodeLogo
    Namespace: IronBarCode
    Assembly: IronBarCode.dll
    Syntax
    public class QRCodeLogo : Object

    An image embedded in the center of a QR code, with control over its size and corner rounding, is described by QRCodeLogo. It is passed to QRCodeWriter.CreateQrCodeWithLogo, so a brand mark is placed on the code at the moment it is generated. Build one from the logo image and the dimensions it should occupy, then hand it to the writer alongside the value being encoded.

    The constructor is overloaded across the ways a developer might supply the artwork: an AnyBitmap, a byte[], a Stream, a file path string, or a Uri. Each form takes either a single size or an explicit width and height, plus an optional roundedCornerRadius. The same values are readable and settable afterward through the Logo, LogoWidth, LogoHeight, and RoundedCornerRadius properties, so a logo built one way can be adjusted before the code is written.

    LogoWidth and LogoHeight size the mark within the symbol, and RoundedCornerRadius softens its corners for a more finished placement. The Logo property holds the AnyBitmap source itself, which lets a developer swap the artwork without rebuilding the object. Keep the mark modest relative to the overall code: a logo covers part of the pattern, so a small, centered image leaves enough of the symbol intact to scan.

    Because the covered modules cannot be read directly, pair a logo with a high error-correction level. CreateQrCodeWithLogo builds in headroom for this, but a logo that fills too much of the code will still defeat recovery, so size it conservatively and test a scan before shipping. For QR codes without a logo, or for non-QR symbologies, use QRCodeWriter.CreateQrCode or BarcodeWriter.CreateBarcode instead.

    using IronBarCode;
    using IronSoftware.Drawing;
    
    var logo = new QRCodeLogo(AnyBitmap.FromFile("logo.png"), 100, 100, 5);
    QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com", logo).SaveAsPng("branded-qr.png");

    The customize QR code style how-to embeds and sizes a logo, the custom QR code example shows it within a styled code, and the QR code generator tutorial builds a complete branded generator.

    Constructors

    QRCodeLogo()

    Creates a Logo to stamp onto a QR code. File formats acceptable include: Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    Declaration
    public QRCodeLogo()

    QRCodeLogo(AnyBitmap, Int32, Int32, Single)

    Creates a Logo to stamp onto a QR code. File formats acceptable include: Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    Declaration
    public QRCodeLogo(AnyBitmap logoImage, int width, int height, float roundedCornerRadius = 0F)
    Parameters
    Type Name Description
    IronSoftware.Drawing.AnyBitmap logoImage

    The logo image as a IronSoftware.Drawing.AnyBitmap. Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    System.Int32 width

    The width of the logo image in pixels. Use the default value 0 (zero) to automatically find the largest viable size.

    System.Int32 height

    The height of the logo image in pixels. Use the default value 0 (zero) to automatically find the largest viable size.

    System.Single roundedCornerRadius

    The radius of the rounded corner of the logo image. Use the default value 0 (zero) for square corners.

    QRCodeLogo(AnyBitmap, Int32, Single)

    Creates a Logo to stamp onto a QR code. File formats acceptable include: Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    Declaration
    public QRCodeLogo(AnyBitmap logoImage, int size = 0, float roundedCornerRadius = 0F)
    Parameters
    Type Name Description
    IronSoftware.Drawing.AnyBitmap logoImage

    The logo image as a IronSoftware.Drawing.AnyBitmap. Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    System.Int32 size

    The desired width and height of the logo image in pixels. If this image is too large for the QR to be readable and exception will be thrown. Use the value 0 (zero) to automatically find the largest viable size.

    System.Single roundedCornerRadius

    The radius of the rounded corner of the logo image. Use the default value 0 (zero) for square corners.

    QRCodeLogo(Byte[], Int32, Int32, Single)

    Creates a Logo to stamp onto a QR code. File formats acceptable include: Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    Declaration
    public QRCodeLogo(byte[] bytes, int width, int height, float roundedCornerRadius = 0F)
    Parameters
    Type Name Description
    System.Byte[] bytes

    The logo image as a array of System.Byte. Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    System.Int32 width

    The width of the logo image in pixels. Use the default value 0 (zero) to automatically find the largest viable size.

    System.Int32 height

    The height of the logo image in pixels. Use the default value 0 (zero) to automatically find the largest viable size.

    System.Single roundedCornerRadius

    The radius of the rounded corner of the logo image. Use the default value 0 (zero) for square corners.

    QRCodeLogo(Byte[], Int32, Single)

    Creates a Logo to stamp onto a QR code. File formats acceptable include: Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    Declaration
    public QRCodeLogo(byte[] bytes, int size, float roundedCornerRadius = 0F)
    Parameters
    Type Name Description
    System.Byte[] bytes

    The logo image as a array of System.Byte. Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    System.Int32 size

    The desired width and height of the logo image in pixels. If this image is too large for the QR to be readable and exception will be thrown. Use the value 0 (zero) to automatically find the largest viable size.

    System.Single roundedCornerRadius

    The radius of the rounded corner of the logo image. Use the default value 0 (zero) for square corners.

    QRCodeLogo(Stream, Int32, Int32, Single)

    Creates a Logo to stamp onto a QR code. File formats acceptable include: Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    Declaration
    public QRCodeLogo(Stream stream, int width, int height, float roundedCornerRadius = 0F)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The logo image as a System.IO.Stream. Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    System.Int32 width

    The width of the logo image in pixels. Use the default value 0 (zero) to automatically find the largest viable size.

    System.Int32 height

    The height of the logo image in pixels. Use the default value 0 (zero) to automatically find the largest viable size.

    System.Single roundedCornerRadius

    The radius of the rounded corner of the logo image. Use the default value 0 (zero) for square corners.

    QRCodeLogo(Stream, Int32, Single)

    Creates a Logo to stamp onto a QR code. File formats acceptable include: Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    Declaration
    public QRCodeLogo(Stream stream, int size = 0, float roundedCornerRadius = 0F)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The logo image as a IronSoftware.Drawing.AnyBitmap. Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    System.Int32 size

    The desired width and height of the logo image in pixels. If this image is too large for the QR to be readable and exception will be thrown. Use the value 0 (zero) to automatically find the largest viable size.

    System.Single roundedCornerRadius

    The radius of the rounded corner of the logo image. Use the default value 0 (zero) for square corners.

    QRCodeLogo(String, Int32, Int32, Single)

    Creates a Logo to stamp onto a QR code. File formats acceptable include: Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    Declaration
    public QRCodeLogo(string filepath, int width, int height, float roundedCornerRadius = 0F)
    Parameters
    Type Name Description
    System.String filepath

    The logo image as a full or relative filepath. Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    System.Int32 width

    The width of the logo image in pixels. Use the default value 0 (zero) to automatically find the largest viable size.

    System.Int32 height

    The height of the logo image in pixels. Use the default value 0 (zero) to automatically find the largest viable size.

    System.Single roundedCornerRadius

    The radius of the rounded corner of the logo image. Use the default value 0 (zero) for square corners.

    QRCodeLogo(String, Int32, Single)

    Creates a Logo to stamp onto a QR code. File formats acceptable include: Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    Declaration
    public QRCodeLogo(string filepath, int size = 0, float roundedCornerRadius = 0F)
    Parameters
    Type Name Description
    System.String filepath

    The logo image as a full or relative filepath. Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    System.Int32 size

    The desired width and height of the logo image in pixels. If this image is too large for the QR to be readable and exception will be thrown. Use the value 0 (zero) to automatically find the largest viable size.

    System.Single roundedCornerRadius

    The radius of the rounded corner of the logo image. Use the default value 0 (zero) for square corners.

    QRCodeLogo(Uri, Int32, Int32, Single)

    Creates a Logo to stamp onto a QR code. File formats acceptable include: Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    Declaration
    public QRCodeLogo(Uri URI, int width, int height, float roundedCornerRadius = 0F)
    Parameters
    Type Name Description
    System.Uri URI

    The logo image as a System.Uri. Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    System.Int32 width

    The width of the logo image in pixels. Use the default value 0 (zero) to automatically find the largest viable size.

    System.Int32 height

    The height of the logo image in pixels. Use the default value 0 (zero) to automatically find the largest viable size.

    System.Single roundedCornerRadius

    The radius of the rounded corner of the logo image. Use the default value 0 (zero) for square corners.

    QRCodeLogo(Uri, Int32, Single)

    Creates a Logo to stamp onto a QR code. File formats acceptable include: Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    Declaration
    public QRCodeLogo(Uri URI, int size = 0, float roundedCornerRadius = 0F)
    Parameters
    Type Name Description
    System.Uri URI

    The logo image as a System.Uri. Jpeg, Jpeg2000, Png, Bmp, Tiff & Gif Image formats are supported.

    System.Int32 size

    The desired width and height of the logo image in pixels. If this image is too large for the QR to be readable and exception will be thrown. Use the value 0 (zero) to automatically find the largest viable size.

    System.Single roundedCornerRadius

    The radius of the rounded corner of the logo image. Use the default value 0 (zero) for square corners.

    Properties

    Logo

    Image Logo to stamp onto a QR code as a IronSoftware.Drawing.AnyBitmap

    Declaration
    public AnyBitmap Logo { get; set; }
    Property Value
    Type Description
    IronSoftware.Drawing.AnyBitmap

    LogoHeight

    Desired height of Logo in px. If zero (default) IronBarcode will automatically maximize the size of your logo for you.

    Declaration
    public int LogoHeight { get; set; }
    Property Value
    Type Description
    System.Int32

    LogoWidth

    Desired width of Logo in px. If zero (default) IronBarcode will automatically maximize the size of your logo for you.

    Declaration
    public int LogoWidth { get; set; }
    Property Value
    Type Description
    System.Int32

    RoundedCornerRadius

    Desired rounding of Logo corners for design purposes. If zero (default) IronBarcode not round the corners of your logo.

    Declaration
    public float RoundedCornerRadius { get; set; }
    Property Value
    Type Description
    System.Single
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget
    %s requires a valid license key for further deployment. Get Trial Below.
    ironsuite
    Blue key in circleGet Started for Free
    30 days full access • No credit card required
    Test in a live environment

    Test in production without watermarks.
    Works wherever you need it to.

    Fully-functional product

    Get 30 days of fully functional product.
    Have it up and running in minutes.

    24/5 technical support

    Full access to our support engineering team during your product trial

    Grey key in circleGet Started for Free
    The trial form was submitted successfully.
    Grey check in circleTrial key delivered
    Your key has been issued and sent to your email.
    Calendar in circleBook Free Live Demo
    No cards • no pitches • no commitments Pick a time for a quick, personalized demo
    Get the most out of your 30-day trial with:

    Live product and key features walk-through

    Project-specific recommendations

    All your questions answered

    Grey key in circleBook Free Live Demo
    Your booking has been completed Check your e-mail for confirmation

    Want to deploy Iron Suite
    to a live project for FREE?

    What’s included?

    • Test in production without watermarks
    • 30 days fully functional product
    • 24/5 technical support during trial
    ironpdf Logo
    ironword Logo
    ironxl Logo
    ironppt Logo
    ironocr Logo
    ironbarcode Logo
    ironqr Logo
    ironprint Logo
    ironzip Logo
    ironwebscraper Logo
    Iron Software sales team
    Online 24/5
    Have Enterprise licensing requirements?
    Request Iron Suite Enterprise trial
    Key in blue circle

    Get your free 30-day Trial Key instantly

    Your trial license will be sent to your email address

    No limitations. 100% unlocked. No credit card.

    bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
    Or
    Key in blue circle

    Complete Your Trial Key Signup

    Tell us a little more about yourself.

    Key in blue circleNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
    Key in blue circle

    Your license key has been delivered to your inbox

    Can't find it? Check your spam folder.

    What’s next?
    Install with NuGet
    Add IronBarcode to your project
    Quickstart Guide
    Helpful resources to get started

    Need help getting started?

    Book a Free Live Demo

    See IronBarcode in action and get your licensing questions answered, or

    Key in blue circle

    Your demo request is in.

    You'll receive an invite via email shortly.

    What’s next?
    Explore Documentation
    Review Licensing Options
    badge_greencheck_in_yellowcircle
    Thank you
    Your trial key should be in the email.
    If it is not, please contact support@ironsoftware.com
    • Logo Aetna
    • Logo NASA
    • Logo GE
    • Logo Porsche
    • Logo USDA
    • Logo Qatar
    Join Millions of Engineers who’ve tried IronBarcode
    Your trial key should be in the email.
    If it is not, please contact support@ironsoftware.com