Commit Graph
154 Commits
Author SHA1 Message Date
BFlat 9d62155ba4 Merge pull request #7868 from dotCooCoo/fix/trace-noise-nearest-color
Image Trace: Noise merges a dark speck into the line beside it, not the ground
2026-11-16 04:29:50 +07:00
Dylan M. Taylor abe90db45a Cover PNG transparency keys in opaque outline decoding 2026-11-15 17:42:47 +00:00
dotCooCoo 3dad1013a4 Image Trace: Noise leaves cut-edge blends out of a speck's color
When Noise picks the nearest color for a speck, the speck's average now
leaves out the semi-transparent pixels along a cut-out image's edge that
are the color beside them blended with the transparent background.
settle_cut_edges returns which pixels those are. A speck made only of
them merges by border. In Grayscale the speck's gray is read with luma,
the gray Grayscale traces with, and the test probe shift_probe denoises
as a trace does.

The docs now say the rule applies in Color and Grayscale (in Black and
White a region has only one neighboring color, so Black and White Logo
changes only by its Noise value), name `ea3f81d9c3` as the base of the
measurements, and say that the gradient-border test sets Noise 15
because at Noise 8 its borders stray 0.92 px against a 0.9 px limit.
2026-11-15 09:01:14 -08:00
dotCooCoo 1727c171ef Image Trace: Noise merges a dark speck into the line beside it, not the ground
A region below Noise joined the color it shares the longest border with, so
the specks of a thin dark line on a light ground joined the ground and the
line broke into dashes. When that color is 10 or more apart from the region's
own (Oklab x 100), the region now joins the neighboring color nearest its
source pixels, among the colors sharing at least a tenth of the longest
border. A single pixel tied between colors still joins by border.

6 Colors and 16 Colors move from Noise 15 to 8, and Black and White Logo from
25 to 5.
2026-11-15 07:20:42 -08:00
FredApps 845e68008b test(trace): keep the image crate's JPEG encoder for the block-artifact fixture
a_jpegs_blocks_are_not_traced_as_steps measures how many traced edges land
on JPEG block boundaries, which depends on the encoder's artifacts. With the
craft-image-codecs encoder 18 of 40 segments sit on block edges; with the
original encoder and the new shared decoder the test passes unchanged, so
the trace itself is unaffected. image stays a dev-dependency only.
2026-11-15 15:48:44 +01:00
FredApps c9cad8d017 Merge main into fix/restore-codec-cutover-ci
Port main's new variable-library parsing (variable kinds, image, visibility
and graph values) from roxmltree to craft-xml with the branch's strict
options and attribute validation. Keep both sides' variable tests.
Drop the stale docx::nesting doc link.
2026-11-15 15:43:44 +01:00
bflatastic 0f08d53b06 Image Trace: a closed seam run is the subpath itself
#7814 made SubPath::anchors an Anchors, and #7810's seam fills, merged in the same batch,
passed it to SubPath::new, which takes a Vec, so vectorcraft-trace doesn't compile on main.
A closed subpath whose every segment is marked is its own run: clone it.
2026-11-15 17:36:46 +07:00
BFlat 4b7af3b6c7 Merge pull request #7792 from dotCooCoo/fix/trace-abutting-seams
Image Trace: Abutting traces draw seam fills under their paths
2026-11-15 15:44:43 +07:00
dotCooCoo 63dab14ee7 Image Trace: Abutting traces draw seam fills under their paths
An Abutting trace with Fills now holds a "Seam Fills" group under its
paths. For each color it has one stroke, 1.5 image pixels wide, along
the edges where a filled path of that color meets a filled path drawn
after it, in that color. A renderer that anti-aliases each path on its
own no longer shows a light hairline along those edges. The traced
paths and their shared edges do not change, and edges against the
image's border, a transparent area or a color left out get no stroke.

- vectorcraft-trace: `seam_fills` finds the segments two filled paths
  share and strokes them in the lower path's color (one stroke per
  gradient path). Overlapping, traces without Fills and Flat Logo get
  none.
- Image Trace commands: the group comes under every path (right above
  the hidden image in a live trace). Expand keeps it, Expand by color
  leaves it under the color groups, and a trace whose paths have more
  than half of the anchor limit gets no seam fills.

Docs: docs/mcp.md, the params text, docs/target-app-parity.md.
2026-11-14 23:15:50 -08:00
dotCooCoo 6f9f9dfa95 Image Trace: Automatic keeps every level of clean flat art of up to 16 levels
Automatic counted flat art's colors with a median cut that never splits a
box narrower than 24 levels, so evenly spaced levels about 17 apart (gray)
or 13 apart (sepia) shared boxes: 16 clean gray levels traced in 14 colors
and 16 sepia levels in 9.

When flat art's pixels fall in 2 to 16 histogram bins, each holding at
least the share a color needs to be counted, and every two bins lie at
least 12 levels apart on some channel, Automatic now takes one color per
bin. If mixed-color merging then finds two of those colors mixed through
each other (dithering, or a thin region beside a close level), the picture
is counted by median cut as before, with rare colors added.

Anti-aliased art whose levels lie more than 20 apart is counted level by
level too, because its blended edge pixels are left out of the count.
Noisy pictures, anti-aliased art whose levels lie 20 or fewer apart and
pictures of 17 levels or more are counted as before, and continuous-tone
classification is unchanged.
2026-11-14 22:33:16 -08:00
Dylan M. Taylor 2f5c8a6d35 fix(trace): preserve CMYK and Lab TIFF alpha outlines 2026-11-14 19:56:11 -05:00
Dylan M. Taylor cb5c52f5e6 fix: validate XML attribute identities and preflight GIF frame limits 2026-11-14 23:25:19 +00:00
Dylan M. Taylor 5122a1f9d9 fix: preserve XML and raster import semantics after codec cutover 2026-11-14 23:25:19 +00:00
Dylan M. Taylor db05483915 fix(codecs): adapt migrated regression tests to shared public APIs 2026-11-14 23:25:19 +00:00
Dylan M. Taylor 08305948cf style: cargo fmt 2026-11-14 23:25:19 +00:00
Dylan M. Taylor 1306afb5e8 Cut over roxmltree, png, tiff, psd, and trace codecs to craft-libs (#7638) 2026-11-14 23:25:19 +00:00
BFlat 5872e71651 Merge pull request #7452 from dotCooCoo/feat/trace-preset-defaults
Image Trace: presets trace at Paths 50 with new Corners and Noise
2026-11-15 06:17:23 +07:00
dotCooCoo 44f8c41a15 Merge main into feat/trace-preset-defaults 2026-11-14 12:48:25 -08:00
dotCooCoo 635491c3d8 Merge main into fix/trace-clean-gray-photo-tone 2026-11-14 12:43:08 -08:00
BFlat e9aea2bfea Merge pull request #7612 from dotCooCoo/perf/trace-quantize-parallel
Image Trace: finding and settling blend pixels runs on all cores
2026-11-15 03:19:55 +07:00
bflatastic 79572cbf6c Revert "Cut over roxmltree, png, tiff, psd, and trace codecs to craft-libs (#7638)"
This reverts commit bada8e1710. #7638 merged with its gate failing: besides six unformatted
files, render and trace don't compile against craft-libs e2dc681 (u64::from(usize) in
render/src/paint.rs, a private craft-libs function, and a call with one argument too many in
trace/src/opaque.rs), so main's CI fails. The tree is that of 0adbdce6cb, whose CI passed.
2026-11-15 02:26:07 +07:00
Dylan M. Taylor bada8e1710 Cut over roxmltree, png, tiff, psd, and trace codecs to craft-libs (#7638) 2026-11-14 13:49:50 -05:00
BFlat 73839f615a Merge pull request #7558 from dotCooCoo/fix/trace-downscale-alpha
Image Trace: scaling a large image down keeps the color of pixels next to clear ones
2026-11-15 00:39:10 +07:00
dotCooCoo 2046c646fa Image Trace: blend settling caps its pairs of label changes at the size of a label copy
The pairs a band or group of strips keeps for its changed labels now grow
by doubling only up to the count that fits in a copy of its labels, so they
never take more memory than that copy. The next change moves them into the
copy.

- Tests: most of a share changing gives the same labels as when few change,
  for both settle passes and every share size (the copy path); both settle
  passes return a picture with no pixels unchanged.
2026-11-14 08:42:53 -08:00
dotCooCoo 3de44da6a6 Image Trace: a gray photo with little noise counts as continuous tone
The continuous-tone check exempts a neutral or single-curve picture when
sixteen colors leave at most a fifth of the error of eight. The
exemption is for flat art of up to sixteen clean levels, where sixteen
colors leave no error. A gray photo with 0 to 2 levels of noise measures
0.19, under the cutoff, so it was classed as flat art and traced without
smoothing, while its color original and the same photo with more noise
were smoothed.

The cutoff is now a tenth (VectorCraft's own value). Clean gray, sepia,
single-hue and duotone art of up to sixteen levels stays flat art.

Docs: docs/target-app-parity.md.
2026-11-14 08:37:49 -08:00
dotCooCoo 4aa2147fba Image Trace: blend settling keeps its changes within the labels' size
Each band of rows (settled) and each group of strips (settled_wide) now
keeps its changed labels as pixel and label pairs only until the pairs
would take more memory than a copy of that part's labels, and then keeps
the copy with the changes made. settled_wide splits the picture into
ranges of columns instead of first listing the start of every strip.

- The tests of settled and settled_wide move into cut_edge.rs, and both
  functions are private again.
- A new test checks that the changes switch to a copy at that size and
  give the same labels either way.
- parallel_map is imported from the crate root, as in deblock.rs and
  smooth.rs.
2026-11-14 08:27:52 -08:00
dotCooCoo 7756b1c815 Image Trace: quantize runs its passes over every pixel on all cores
Finding the blend pixels and settling them onto a side took about 85% of
color quantize on a 16 MP raster, all of it on one thread. The k-means
palette step works on at most 32,768 histogram bins and took under 1%.

- own_colours_among and settled work through bands of about 65,536
  pixels with layers::parallel_map (one thread on wasm32) and join the
  results in row order. settled reads every pixel's neighbors from the
  labels as they were before any change, as before, without copying
  them.
- settled_wide settles groups of its 7-column strips apart; each strip
  already started from empty buffers.
- A picture with no pixels returns before any band or strip is made.

The output does not change.
2026-11-14 07:31:06 -08:00
BFlat ea8aaa1a56 Merge pull request #7469 from dotCooCoo/fix/trace-flat-16-levels
Image Trace: clean flat art of 10 to 16 evenly spaced levels traces as flat color
2026-11-14 21:51:05 +07:00
dotCooCoo 9e0882199b Image Trace: scaling a large image down keeps the color of pixels next to clear ones
An image over 64 megapixels is scaled down before tracing with a box
filter that averaged red, green and blue without weighing them by alpha.
A clear pixel (stored as transparent black) next to an opaque one pulled
the scaled pixel's color toward black: an opaque red and a clear pixel
gave a half-clear red at half its brightness.

Each scaled pixel now takes its alpha as the mean of its block and its
color from the block's colors weighted by their alpha. A wholly clear
block keeps the plain mean of its colors. Every source pixel now counts
in exactly one block, so the block edges differ slightly from before and
an opaque image can also scale to slightly different values.
2026-11-14 03:20:46 -08:00
dotCooCoo 27e75cfce2 Merge main into fix/flat-logo-gray-between-black-and-white 2026-11-14 02:40:29 -08:00
dotCooCoo fb48216aa2 Image Trace: clean flat art of 10 to 16 evenly spaced levels traces as flat color
The continuous-tone check exempts a neutral or single-curve picture when
sixteen colors leave at most a fifth of the error of eight, but only
applied the exemption below the 0.1 ratio. Clean gray, sepia, single-hue
and duotone art of 10 to 16 evenly spaced levels lands above it, so it
was smoothed before tracing. The exemption now applies in both branches.

At 16 Colors, 12 sepia and 16 gray or sepia levels crossed by 1 px lines
keep every region the lines cut, and Automatic traces 16 clean sepia
levels in 9 colors instead of 4. Art in several unrelated colors is
unaffected.
2026-11-13 21:23:00 -08:00
dotCooCoo 3ea1524618 Image Trace: Flat Logo traces a gray between black and white as one shape
With a gray among the colors, an anti-aliased edge pixel of black on
white is also a mix of black and gray, or of gray and white, and the
unmixing took the mix with the smallest error, which often held the
gray. A black disc and a gray square on white traced the gray as the
square plus 8 to 24 slivers around the disc, with the colors found or
named exactly.

When another mix of two classes also reproduces an edge pixel, the pixel
now takes it if that mix's classes lie nearer in the flat areas around
the pixel and the pixel has a neighbor on each side of the left-out
class, along the line between the other two. Pixels within a few levels
of a class outside a flat area are checked the same way, and they now
count toward the number of pixel values that decides when a busy image
is averaged down further. A flat area that stands for no class, as with
colors named some levels off, counts as holding the classes of its mix,
and so do the pixels of exactly its color joined to it. Whether a
hard-edged image is softened is still judged from each pixel's best mix.

The slivers are removed around sharp edges and edges blurred by up to
about half a pixel; an edge blurred by a pixel or more, or pixel noise
of a level or more, can still leave some. Gray strokes two and three
pixels wide beside black stay gray, and so does a one-pixel gray line
between black and white of at least 13 joined pixels. These trace as
black and white: a shorter one-pixel line, or one that falls between
pixels or is blurred; a soft-edged gray stroke about two pixels wide
touching black; and most or all of a soft-edged stroke about three
pixels wide touching black, 12 pixels long or less.

Docs: docs/image-trace-adjustments.md, docs/target-app-parity.md.
2026-11-13 20:32:14 -08:00
dotCooCoo 6027126a1f Merge main into feat/trace-preset-defaults 2026-11-13 20:19:30 -08:00
BFlat 83ed754450 Merge pull request #7326 from dotCooCoo/fix/trace-jpeg-blocks
Image Trace: a JPEG's 8 x 8 blocks no longer trace as staircase steps
2026-11-14 08:39:13 +07:00
dotCooCoo 815c772a46 Image Trace: presets trace at Paths 50 with new Corners and Noise
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.
2026-11-13 17:13:52 -08:00
dotCooCoo dd411ec6b4 Image Trace: a JPEG's 8 x 8 blocks no longer trace as staircase steps
A JPEG rounds each 8 x 8 block's tone on its own, which leaves a small
step at every block edge. Where a dark ground changes slowly, those steps
decided which of two palette colors a whole block got, and the trace
followed the block edges as a staircase.

The new deblock pass finds the block grid in the image: the mean step
between neighboring opaque pixels must peak at the same one of eight
positions at both block edges of a 16 px span, across and down. Cropped
JPEGs and JPEGs saved in another format are found the same way; pictures
of flat 8 x 8 cells are not. At each block edge, a stretch of eight lines
whose step is under the limit and whose pixels hold no edge has the step
spread over the eight pixels around the edge, as the deblocking filters
of ITU-T H.263 Annex J and MPEG-4 Part 2 Annex F.3.1 do. Larger steps are
kept. The limit, the edge guard and how much of each line's own step is
smoothed depend on the mode: Black and White smooths only the smallest
steps, and traces of more than 16 colors move every line of a stretch
by the same amount. The pass runs before the photo pre-filter and works
in strips of rows, so only its output is as large as the image.
2026-11-13 15:47:30 -08:00
dotCooCoo aab26c2b31 Image Trace: a nearly flat dark ground keeps one color in a Limited palette
The Limited palette's median cut ranks cuts by pixel-weighted gain. A
large near-black ground with faint noise therefore took two colors less
than 0.02 apart in Oklab, and the trace drew blotches of one over the
other.

With 9 to 16 colors, a cut whose two sides both have a dark gray mean
(Oklab lightness under 0.30, chroma under 0.03) and lie less than 0.03
apart now has its gain scaled by (distance / 0.03)^2 while the cut is
chosen. The ground keeps one color, and the color it would have taken
goes to another cut. Document Library without swatches follows Limited.
Other color counts, Full Tone and Automatic choose the same cuts as
before.
2026-11-13 15:13:54 -08:00
BFlat e5913e30e1 Merge pull request #7204 from dotCooCoo/fix/trace-overlapping-two-pass
Image Trace: Overlapping fills each shape whole and stacks what it encloses above it
2026-11-14 04:31:56 +07:00
dotCooCoo c5b20136ae Merge main into fix/trace-blur-rings
# Conflicts:
#	docs/image-trace-quality.md
2026-11-13 10:06:37 -08:00
dotCooCoo db10eaf115 Image Trace: Overlapping holds an image's untraced pixels in one list of runs
The runs of transparent and left-out pixels that the first round checks
holes against were kept in a list for each row. A tall, narrow image paid
a list header for every row: 1.1 MB for a 3 x 20,000 pixel image with
two runs. The runs are now one list over the whole image, so they take
at most four bytes a pixel, as the half-gigabyte bound counts them.
2026-11-13 09:58:38 -08:00
dotCooCoo 55820e48b4 Image Trace: Overlapping's trace is checked across thread orders, and its memory bound names the kept components
The overlapping test now traces the same image eight times with several
levels found at a time and compares each result with the one traced a
level at a time. The doc comment of the stacked rounds says that the
components kept for the second pass take up to 256 MiB outside the half
gigabyte that sets how many levels are traced at once.
2026-11-13 09:43:19 -08:00
dotCooCoo b4ad756721 Image Trace: Overlapping fills each shape whole and stacks what it encloses above it
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.
2026-11-13 09:07:19 -08:00
dotCooCoo 9bf05dece4 Image Trace: blurred edges no longer trace as rings of in-between colors
A blend pixel took a side of its edge only when the picture's own colors
on both sides lay within 2 px of it. With a limited palette, an edge
blurred over more than about 4 px kept the middle of its ramp in the
palette's in-between tones, which traced as rings of thin paths around
the edge.

With a Limited palette of at most 16 colors (3 Colors, 6 Colors,
16 Colors) and in Grayscale with at most 16 grays (Shades of Gray),
settled_wide looks for the own colors within 8 px, pairs the 8 of them
nearest to the pixel's color, and moves the pixel to the nearer side of
the best pair when that pair explains it twice as well as its own color,
or when it lies between the two and off the line between them by less
than 0.15 of their distance apart. These values are VectorCraft's own.
Of two pairs that explain it equally well it takes the closer one. A
pixel keeps its color when an own pixel of that color lies within 4 px
or when its color is one of the pair. Grayscale compares lightness. The
colors within reach are kept as bitsets for a strip of 7 columns at a
time.

High Fidelity Photo, Low Fidelity Photo, Black and White and the other
palettes keep the 2 px rule unchanged.

On the quality harness, blurred and scanned flat art with 6 and
16 Colors goes from 6 to 9 paths to 3, and from 0.23 to 0.26 px off to
0.07 to 0.11. Askew shapes take up to 11 px more area in colors the art
does not have, thin lines with 16 Colors lose more (largest distance
23.5 to 45.3 px), and Shades of Gray traces thin lines in 7.3 paths
where it took 5.3.

Noisy images settle more of their pixels: the dense grouping test
traces 150 x 150 noise instead of 120 x 120 to keep more than its 500
paths.

Covers the limited-palette part of #1911 (leogrox).

Docs: docs/target-app-parity.md, docs/image-trace-quality.md.
2026-11-13 08:54:47 -08:00
dotCooCoo bc9280967a Image Trace: staircases of longer steps in smooth areas trace as slopes
Where a band border in a gradient or a shaded area runs at a slant, its
pixels form a staircase whose steps are two or more pixels long. When one
piece of outline also runs along a sharp edge in the image, that piece as
a whole is not the contour of a smooth area, and the outline kept a
corner at every step, so the border was traced as a series of right-angle
steps.

subpixel::outline now reads a run of three or more edges of 1 to 8 px,
each turning one way where it starts and the other where it ends, with no
junction on it, as a staircase when the run's own cracks pass
subpixel::low_contrast. A run is cut at any step whose own cracks show half
of the step between the two colors or more. Its edges are steps, as
one-pixel steps already were: no corner where two of them meet, and one
point at the middle of each, moved by the mean of its cracks' shifts. The
corner where a run meets an edge that is not a step stays, so a straight
edge longer than 8 px next to a staircase stays straight. Two one-pixel
steps inside a run are read as part of the slope and do not make a notch.
Longer steps, staircases along a sharp edge and Black and White traces
keep their corners. The runs are the same from either side of the border.

On gradient and photo inputs most traces take fewer anchors. Some rows get
worse: 6 Colors on gradient and photo leaves a gap of 0.9 px (was 1.2) and
an overlap of 1.0 px (was 0.8), High Fidelity Photo with Gradients on a
blurred input takes 50 anchors (was 47), and on a synthetic 800 px photo
the 95th percentile of High Fidelity Photo's pixel difference rises from
6.33 to 6.67 and 16 Colors leaves 2 staircases of 2 px steps or more where
it left none.

Docs: docs/target-app-parity.md, docs/image-trace-quality.md.
2026-11-13 08:29:28 -08:00
dotCooCoo 093f04952c Image Trace: Create Strokes makes a wide shape's thin features strokes and keeps its body a fill
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.
2026-11-13 01:01:59 -08:00
dotCooCoo ac76040014 Merge main into feat/outline-object-image-alpha 2026-11-12 20:16:33 -08:00
BFlat 321aa13251 Merge pull request #6962 from dotCooCoo/fix/trace-tinted-photos
Image Trace: sepia, single-hue and duotone photos are smoothed as gray photos are
2026-11-13 04:25:36 +07:00
dotCooCoo 950494802e Merge main into feat/outline-object-image-alpha
# Conflicts:
#	crates/effects/src/tests.rs
2026-11-12 12:45:45 -08:00
BFlat 28d97a82a8 Merge pull request #6954 from dotCooCoo/fix/trace-logo-flatness-own-colors
Image Trace: Flat Logo judges flat art by the image's own colors
2026-11-13 03:27:17 +07:00
dotCooCoo eee6fb51fd Image Trace: sepia, single-hue and duotone photos are smoothed as gray photos are
Color and Grayscale traces smoothed a gray photo before choosing its
colors, but a tinted photo with the same tones skipped smoothing: the
0.065 error rule applied only to pictures whose channels stay within 8
levels of each other. A picture whose opaque pixels lie, 19 in 20, within
6 levels of one tone curve now takes the same rule. The curve runs
through the median color of each 8-level stretch along the colors' main
direction, and a pixel on it must also lie within 6 levels of the plane
the colors spread along most, so art in several unrelated colors is not
counted. The sixteen-versus-eight exception still keeps clean flat art
on the flat-art route.
2026-11-12 11:39:53 -08:00