@blockchaincommons/multipart-ur - v1.0.0-beta.3
    Preparing search index...

    Class Logo

    An RGBA logo to overlay on the centre of a QR code. Instances are frozen and own their pixels.

    Implements

    Index
    pixels: Uint8Array

    The straight-alpha RGBA pixels, row-major.

    width: number

    Width in pixels.

    height: number

    Height in pixels.

    fraction: number

    The logo's width as a fraction of the QR code's module width.

    clearBorder: number

    Modules cleared around the logo.

    clearShape: LogoClearShape

    The cleared area's shape.

    • A logo decoded from PNG or JPEG bytes, the formats the reference is built with, as its into_rgba8 decodes them: every PNG colour type and bit depth (palettes and tRNS expanded, sub-byte grey scaled, 16-bit samples as (c + 128) / 257). Any other format, or bytes that do not decode, are ImageEncode (failed to decode image: … with the reference's wording: The image format Gif is not supported, The image format could not be determined). SVG needs the /svg-logo entry (logoFromSvg).

      Parameters

      Returns Logo