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

    Interface GigaImageRef

    A reference to an image blob in the document's resource table (model::ImageRef).

    interface GigaImageRef {
        resource: string | number;
        alt: string | null;
        size_pt?: [number, number];
        crop?: [number, number, number, number];
    }
    Index

    Properties

    resource: string | number

    Content-hash key into GigaDocument.resources.images.

    A decimal string: the underlying id is a full 64-bit hash, which does not survive JSON.parse as a JavaScript number (precision is lost past 2^53, silently orphaning the reference from its resource — every image was dropped from toModel() → modelTo* round-trips). The engine emits it as a string and accepts either form (string canonically, legacy number for hand-built models with small ids).

    alt: string | null
    size_pt?: [number, number]

    Authored display size [width, height] in points (DOCX inline wp:extent) — a flow image re-exports at its real size instead of a default extent. Omitted when the source carried none. Present since 0.117.0.

    crop?: [number, number, number, number]

    Source-rectangle crop [left, top, right, bottom] inset fractions (0..=1 each; DrawingML a:srcRect). Omitted = uncropped. Present since 0.117.0.