Search Results for

    Show / Hide Table of Contents

    Class QrLogo

    Represents a logo to be embedded within a QR code.

    Inheritance
    System.Object
    QrLogo
    Namespace: IronQr
    Assembly: IronQr.dll
    Syntax
    public sealed class QrLogo : ValueType

    An image embedded in the center of a QR code is described by QrLogo. It is assigned to QrStyleOptions.Logo, so a brand mark is placed on the code at the moment it is saved. Build one from the logo image and its target size.

    The constructor takes an AnyBitmap plus a width, height, and cornerRadius, and the Bitmap, Width, Height, and CornerRadius properties expose the same values. Width and Height size the logo within the code, and CornerRadius rounds its corners for a softer placement. Because a logo covers part of the symbol, raise the QrErrorCorrectionLevel on the QrOptions used to write the code so it still scans reliably, and keep the logo small relative to the code's Dimensions. A rounded, modestly sized mark reads as deliberate branding while leaving enough of the pattern intact for dependable scanning.

    style.Logo = new QrLogo(logoBitmap, 80, 80);

    The custom logo how-to embeds a logo, and the styled QR example shows it within a full style.

    Constructors

    QrLogo(AnyBitmap, Int32, Int32, Single)

    Initializes a new instance of the QrLogo struct with the specified bitmap, width, height, and corner radius.

    Declaration
    public QrLogo(AnyBitmap bitmap, int width = 0, int height = 0, float cornerRadius = 0F)
    Parameters
    Type Name Description
    IronSoftware.Drawing.AnyBitmap bitmap

    The bitmap image of the logo.

    System.Int32 width

    The width of the logo. Defaults to 0.

    System.Int32 height

    The height of the logo. Defaults to 0.

    System.Single cornerRadius

    The corner radius of the logo. Defaults to 0.

    Properties

    Bitmap

    Gets or sets the bitmap image of the logo.

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

    CornerRadius

    Gets or sets the corner radius of the logo, allowing for rounded corners.

    Declaration
    public float CornerRadius { get; set; }
    Property Value
    Type Description
    System.Single

    Height

    Gets or sets the height of the logo.

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

    Width

    Gets or sets the width of the logo.

    Declaration
    public int Width { get; set; }
    Property Value
    Type Description
    System.Int32
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with NuGet