png-compressor
    Preparing search index...

    Interface IPngMetadataTransparency

    A metadata entry that defines "simple transparency," allowing transparency within non-alpha color types. The transparency defined in this chunk is applied automatically to the data during decoding.

    interface IPngMetadataTransparency {
        transparency: number | number[] | [number, number, number];
        type: "tRNS";
    }
    Index

    Properties

    Properties

    transparency: number | number[] | [number, number, number]

    The transparent color or the transparency of the palette color, the format depends on the image color type:

    • 0 (Greyscale): number - the shade of grey that will use alpha 0.
    • 2 (Truecolor): [number, number, number] - the color rgb that will use alpha 0.
    • 3 (Indexed): [number, ...] - The alpha value of palette entries, this may not include all palette entries.
    type: "tRNS"

    The type of metadata, this is typically the name of the chunk from which is originates.