PngExporter
Defined in: src/exporters/PngExporter.ts:25
PngExporter - Converts SVG to PNG with resvg, a native, browser-free
rasterizer.
Note: resvg does not fetch external images (like AWS service icons from a
CDN). exportPng (the sfn-diagram/png subpath) inlines them as data URIs
first via embedIcons when showIcons is set; a caller using PngExporter
directly must do the same.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PngExporter(options): PngExporter;Defined in: src/exporters/PngExporter.ts:32
Parameters
Section titled “Parameters”options
Section titled “options”PngExporterOptions
Background, font, scale and theme options for the PNG.
Returns
Section titled “Returns”PngExporter
Throws
Section titled “Throws”When engine is set to anything other than 'resvg'.
Methods
Section titled “Methods”convert()
Section titled “convert()”convert(params): Promise<PngOutput>;Defined in: src/exporters/PngExporter.ts:46
Convert SVG string to PNG buffer
Parameters
Section titled “Parameters”params
Section titled “params”ConvertParams
Returns
Section titled “Returns”Promise<PngOutput>