Render Mermaid as PNG
render_pngRasterize a Mermaid source string to PNG. Returns { ok, png_base64 }. Hosted rendering uses resvg-wasm with bundled fonts; bytes may differ from the local napi renderer, so hosted PNG is a convenience surface, not part of the byte-determinism contract. For file/URL artifacts use the local stdio server.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fitTo | No | Exactly one output width or height constraint. | |
| scale | No | Positive output scale used when no fitTo constraint is supplied. | |
| source | Yes | Mermaid source. | |
| options | No | Shared advanced RenderOptions object. | |
| background | No | Portable basic color or hex color painted behind the raster artifact. |