Skip to content

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

NameTypeDescription
quality (optional)numberQuality for the lossy formats, 0 to 1. Ignored for PNG, where the browser rejects a quality argument.
scale (optional)numberDevice 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)booleanLeave 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)JmImageTypeOutput format. JPEG and WebP are lossy, PNG is not.

JmExportImageResult ​

Interface

The encoded image returned by JsMind.exportImage, plus its dimensions.

Properties

NameTypeDescription
blobBlob
cssHeightnumberContent height in CSS pixels, before scaling.
cssWidthnumberContent width in CSS pixels, before scaling.
heightnumberPixel height of the image.
widthnumberPixel width of the image, i.e. the content width times scale.

JmImageType ​

Enumeration

Image formats a caller may ask for.

Members

NameValueDescription
Jpeg"image/jpeg"
Png"image/png"
Webp"image/webp"

本文档由 AI 协助生成 / This documentation was prepared with AI assistance