Image export
Preview version
The jsMind V2 programming API is currently a preview. The API will change in later updates. Please check this documentation anytime for the interface that is current.
Types used by JsMind.exportImage.
This page is generated from the published typings dist/jsmind.d.ts with TypeDoc.
JmExportImageOptions
Interface
Options for exporting the rendered mind map to an image.
Properties
| Name | Type | Description |
|---|---|---|
quality (optional) | number | Quality for the lossy formats, 0 to 1. Ignored for PNG, where the browser rejects a quality argument. |
scale (optional) | number | Device pixel ratio to render at. 2 gives a crisp result on high-density screens and stays cheap; 1 mirrors what the user sees. |
transparent (optional) | boolean | Leave the canvas background transparent instead of filling it with the theme color. Opt-in; the default export is unchanged. JPEG has no alpha channel, so this option is ignored with a warning when type is image/jpeg. |
type (optional) | JmImageType | Output format. JPEG and WebP are lossy, PNG is not. |
JmExportImageResult
Interface
The encoded image returned by JsMind.exportImage, plus its dimensions.
Properties
| Name | Type | Description |
|---|---|---|
blob | Blob | |
cssHeight | number | Content height in CSS pixels, before scaling. |
cssWidth | number | Content width in CSS pixels, before scaling. |
height | number | Pixel height of the image. |
width | number | Pixel width of the image, i.e. the content width times scale. |
JmImageType
Enumeration
Image formats a caller may ask for.
Members
| Name | Value | Description |
|---|---|---|
Jpeg | "image/jpeg" | |
Png | "image/png" | |
Webp | "image/webp" |