Action Image
Vectorize Image
Converts a raster image (PNG, JPG, etc.) into a vector SVG file using advanced tracing algorithms for smooth, high-quality results.
Node IDVectorizeImageAction
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Source File Path sourceFilePath | file_picker | Yes | — | The full path to the source raster image (e.g., "C:/temp/image.png"). |
Output File Path outputFilePath | file_picker | Yes | — | The full path for the output SVG file (e.g., "C:/temp/image.svg"). |
Color Mode colorMode | enum | Yes | color | 'color' preserves all colors, 'binary' converts to black and white silhouette. |
Path Simplify Mode pathSimplifyMode | enum | Yes | Polygon | The mode to generate Shapes from |
Hierarchical hierarchical | enum | Yes | stacked | How to layer shapes. 'stacked' overlays shapes, 'cutout' uses holes for inner shapes. |
Filter Speckle (pixels) filterSpeckle | integer min 0 , max 100 | No | 4 | Ignore areas smaller than this many pixels. Higher values remove noise but may lose small details. |
Color Precision colorPrecision | integer min 1 , max 8 | No | 6 | Color depth (bits). Lower values group similar colors together, higher values preserve more color detail. |
Layer Difference layerDifference | integer min 0 , max 255 | No | 16 | Threshold for separating colors into layers. Higher values create fewer, more consolidated layers. |
Corner Threshold cornerThreshold | integer min 0 , max 180 | No | 60 | Angle threshold for detecting corners (degrees). Lower values preserve more sharp corners. |
Segment Length segmentLength | float min 0.5 , max 100 | No | 10 | Length threshold for line segments. Higher values create smoother, more simplified paths. |
Splice Threshold spliceThreshold | integer min 0 , max 180 | No | 45 | Angle threshold for splicing segments (degrees). Higher values create smoother curves. |
Path Precision pathPrecision | integer min 0 , max 10 | No | 8 | Decimal precision for SVG path coordinates. Higher values = more precise but larger files. |
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 doesn't exist. |
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
Execute input0 | object | Yes | Triggers the vectorization process. |
Outputs
| Output | Type | Identifier | Description |
|---|---|---|---|
Output Path output0 | string | outputFilePath | The path to the generated SVG file. |
File Size output1 | integer | fileSize | The size of the generated SVG file in bytes. |