View as Markdown

API reference: @salmonui/data-grid/engine/export

ExportImageinterface

import type { ExportImage } from '@salmonui/data-grid/engine/export';
interface ExportImage {
    readonly data: Uint8Array;
    readonly type?: 'png' | 'jpeg';
    readonly width: number;
    readonly height: number;
}

An image drawn in a cell: PNG or JPEG bytes and the display size in CSS px (96 dpi). type is sniffed from the magic bytes when absent. XLSX embeds it as a picture anchored to the cell, PDF as an image XObject; CSV writes the cell text.

ExportImage members (4)
NameSignatureDescription
datareadonly data: Uint8Array;
typeoptionalreadonly type?: 'png' | 'jpeg';
widthreadonly width: number;
heightreadonly height: number;