Paint: export a file
paint_exportSave a canvas as PNG, JPG, BMP, SVG, or layered .paint, returning the file path and a preview of the output.
Instructions
Write the canvas out: png, jpg, bmp, svg (rebuilt from recorded vector operations) or .paint (layered, re-openable). Returns the path under the paint root plus a preview of exactly what was written.
svg keeps rect/ellipse/line/polygon/path/text/gradient operations; raster-only steps (brush, fill, pixels, filters, stamps) cannot be vectorised and are reported. Set embed_raster_fallback to also place the current PNG behind them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Target path relative to the paint root; omit to use the canvas name | |
| canvas | Yes | Canvas name. Letters, digits, space, dot, dash, plus; the .png/.paint suffix may be included or omitted. | |
| format | No | auto = png unless path says otherwise | auto |
| flatten | No | true = whole canvas, false = active layer only (raster formats) | |
| preview | No | Image reply: auto/thumb = downscaled picture back into the result, full = unpixelated, none = text only | |
| quality | No | jpeg quality or png deflate effort | |
| background | No | Colour to flatten onto, e.g. '#ffffff'; null keeps transparency | |
| embed_raster_fallback | No | svg only: embed the current picture underneath the vector shapes |