Every built-in preset other than Auto Color and Flat Logo now traces at
Paths 50. Corners is 100 in Technical Drawing, 75 in Default, Black and
White Logo, Line Art and Outline, and 50 in the others. Noise is 1 px in
Technical Drawing, 5 in High Fidelity Photo, 10 in Low Fidelity Photo, 15
in 3 Colors, 6 Colors, 16 Colors and Shades of Gray, 20 in Sketched Art,
Line Art and Outline, 25 in Default and Black and White Logo, and 90 in
Silhouettes. Palettes, color counts and the other options are unchanged.
This changes the output of every preset but Default, Auto Color and Flat
Logo. The traces take fewer anchors (High Fidelity Photo 5,494 to 3,136
and Black and White Logo 27 to 14 in crates/trace/tests/quality), and
outlines on flat art lie further from the true edge (16 Colors 0.100 to
0.123 px off on average).
Docs: docs/image-trace-adjustments.md, docs/image-trace-quality.md,
docs/target-app-parity.md.
An Overlapping layer covers the colors above it within its area, so an
area of another color that a shape enclosed was a hole in that shape
and in the shape of every layer around it, and its outline was fitted
once for each of them. In a code-drawn test, a white disc in a black
ring that four grays touch had six copies of its outline.
With Fills and without Create Strokes, each shape is now filled whole,
by a fill rule of VectorCraft's own. The area inside a filled hole is
traced on its own and drawn after the shapes around it, so its outline
is fitted once. An area of one color is drawn from the hole's outline.
A shape keeps a hole where the area holds a transparent pixel or a
color that Ignore Color or Keep Colors leaves out, and a hole smaller
than Noise is filled with the shape's color as before. Nested areas are
traced within a work budget of VectorCraft's own: four times the
image's pixels (counted as at least 65,536) times its colors, each area
costing its box times its colors. An area that costs more than what is
left keeps its holes and is not charged. Create Strokes and outlines
without Fills are unchanged.
Shapes have holes only in those cases, there are more paths, and the
stacking order changes. Expand by Color starts another group of a color
where an area is drawn above the shape around it. The trace's progress
counts finer steps across the rounds of enclosed areas, not one step
per color layer.
A layer's components without its own color are now left out after its
mask is traced, instead of in a labeling pass before it. Every route
finds its components through the same function.
Stroke is the widest feature that can be stroked, and it was applied to
each connected shape as a whole: a thick body with thin arms stayed one
filled area. Now a shape wider than Stroke somewhere keeps as its area
every disc wider than Stroke that fits in it, and each piece outside
those discs that reaches out of them at least one and a half times its
own width (and 3 px) is traced as a stroked center line. A line's end at
the area goes to the cut, so the line's cap closes the join. Corners and
edge slivers stay in the area, and a piece that cannot be traced stays
in it too. Shapes no wider than Stroke trace as before.
Each line keeps one width; without Fills, the area is still a 1 px
outline.
Docs: docs/target-app-parity.md.
With logoColors named, Flat Logo measured how flat the image is against
the named colors. A solid pixel counts as flat only within 22 (RGB
distance) of one of those colors or white. Flat art whose named colors
were 20 levels off in every channel was refused as not flat, and the
refusal score of a gradient changed with the names.
The check now uses the image's own colors, found the same way as when
no colors are named. It looks for as many colors as are named, with
white, or as the Colors setting gives, whichever is more. How far the named colors are
from the image's colors no longer changes whether the image is refused.
This changes one existing behavior: an image with large areas of a
color that was not named used to be refused, and it is now traced in
the named colors.
Docs: docs/image-trace-adjustments.md, docs/target-app-parity.md, the
imageTrace.make params text.
Found while testing crates/trace/src/params.rs:248-251 (enhanced_preset)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>