mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-09 16:38:07 +00:00
The bilateral smoothing pass worked out a squared colour distance, a powi, a division and a weight for every pixel and neighbour, and called round() per channel. The distance is a whole number up to 195,075, so the weights come from a table built once per trace, and the rounding is a truncation plus a compare that gives the same level as round() for 0..=255. Rows are read through slices. The output is byte for byte what it was; tests compare the pass with the old formula on several images and on every pair of grey levels. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>