Home > @magiclane/maps-sdk > GemImage > (constructor)
GemImage.(constructor)
Constructor
SVG bytes are accepted anywhere an image is accepted: when the bytes look like an SVG document (or format is ImageFileFormat.svg), they are rasterized to PNG in the background at 2× the SVG's declared size. Because rasterization is asynchronous in browsers, either use the await-able GemImage.fromSvg() factory (recommended) or call await GemImage.whenSvgReady() before passing SVG-backed images to the engine (e.g. addList).
Signature:
constructor(input?: {
image?: Uint8Array;
format?: ImageFileFormat;
imageId?: number;
});Parameters
Parameter | Type | Description |
|---|---|---|
{ image, format, imageId, } | (not declared) | (Optional) |
input | { image?: Uint8Array; format?: ImageFileFormat; imageId?: number; } | (Optional) |
input properties:
- Optional image?: Uint8Array
- Optional format?: ImageFileFormat
- Optional imageId?: number