Skip to main content
Jeremias Meister - Tools & Pipeline

Action Image

Rasterize SVG

Converts an SVG file into a raster image (PNG, JPEG, WebP, etc.) at a specified pixel size. Accepts SVG files from any source, including Krita, Illustrator, or hand-written SVGs.

Node IDRasterizeSvgAction

Parameters

ParameterTypeRequiredDefaultDescription
Source File Path sourceFilePath file_picker Yes — The full path to the source SVG file.
Output File Path outputFilePath file_picker Yes — The full path for the output raster image. The file extension determines the format (e.g., .png, .jpg, .webp).
Width width integer min 1 Yes 512 Target width of the output image in pixels.
Height height integer min 1 Yes 512 Target height of the output image in pixels.
Keep Aspect Ratio keepAspectRatio boolean No true If true, the SVG is scaled to fit within the target dimensions while preserving its aspect ratio. The remaining area is filled with the background color.
Use Custom Background Color useCustomBackgroundColor boolean No false If false, uses a transparent background for formats that support alpha (PNG, WebP), or white for formats that do not (JPEG, BMP).
Background Color backgroundColor color No [255,255,255] The background fill color. Only used when Use Custom Background Color is enabled.
Overwrite overwrite boolean No false If true, overwrites an existing file at the output path.
Create Directory createDirectory boolean No true If true, creates the parent directory for the output file if it does not exist.

Inputs

InputTypeRequiredDescription
Execute input0 object Yes Triggers the rasterization process.

Outputs

OutputTypeIdentifierDescription
Output Path output0 string outputFilePath The path to the generated raster image.