@qrcommunication/gigapdf-lib — SDK API reference - v0.110.3
    Preparing search index...

    Interface ImageElementInfo

    An image element from GigaPdfDoc.imageElements: its placement box (page user space, origin bottom-left), the embeddable encoded bytes + format, and the source pixel dimensions. data is empty when format is "unknown".

    interface ImageElementInfo {
        index: number;
        x: number;
        y: number;
        width: number;
        height: number;
        format: string;
        pixelWidth: number;
        pixelHeight: number;
        data: Uint8Array;
        rotation: number;
        opacity: number;
    }
    Index

    Properties

    index: number

    The image's unified element index — the same value accepted by GigaPdfDoc.removeElement / GigaPdfDoc.transformElement / GigaPdfDoc.duplicateElement / GigaPdfDoc.moveElement. Extract an image here and pass this index to edit that exact image. It is not an image-local 0,1,2 counter, so it is correct on pages that also have text/paths.

    x: number
    y: number
    width: number
    height: number
    format: string

    "jpeg" | "png" | "jp2" | "unknown".

    pixelWidth: number
    pixelHeight: number
    data: Uint8Array

    Embeddable encoded image bytes (empty when format === "unknown").

    rotation: number

    Rotation in degrees from the placement CTM (0 = upright).

    opacity: number

    Non-stroking fill alpha (/ExtGState /ca), 0..=1 (1 = opaque).