Skip to content

Vectorization Options

Fine-tune the vectorization process with individual parameters.

Color Controls

ParameterCLI FlagRangeDescription
Color precision--color-precision1–32Higher = more colors in output
Color mode--color-modecolor, binaryFull color or black & white
bash
# 16-color output
covecto photo.jpg --color-precision 16 -o out.svg

# Binary (black & white)
covecto sketch.png --color-mode binary -o out.svg

Path Controls

ParameterCLI FlagRangeDescription
Corner threshold--corner-threshold0–180Higher = fewer corners detected
Splice threshold--splice-threshold0–100When to splice paths
Length threshold--length-threshold0+Discard paths shorter than this
Path precision--path-precision0+Decimal places in coordinates
Path simplify--path-simplifyspline, polygon, noneSimplification algorithm
bash
# Fewer corners, smoother curves
covecto input.png --corner-threshold 100 --splice-threshold 60 -o out.svg

# Simplify to polygons (smaller file)
covecto input.png --path-simplify polygon -o out.svg

Noise & Quality

ParameterCLI FlagDescription
Filter speckle--filter-speckle <N>Remove regions smaller than N pixels
Max iterations--max-iterations <N>Max color quantization iterations

Layer Controls

ParameterCLI FlagValuesDescription
Hierarchical--hierarchicalstacked, cutoutLayer compositing mode
Layer difference--layer-difference <N>intLayer grouping threshold
bash
# Stacked layers (good for photos)
covecto photo.jpg --hierarchical stacked --layer-difference 5 -o out.svg

# Cutout layers (good for logos with transparency)
covecto logo.png --hierarchical cutout --layer-difference 10 -o out.svg

Presets vs Individual Params

Presets and profiles override individual params. Order of precedence:

  1. Individual CLI flags (highest)
  2. --preset / --profile
  3. Defaults (lowest)
bash
# Profile sets engine + multiple params, --corner-threshold overrides
covecto input.png --profile icon --corner-threshold 120 -o out.svg