mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-15 23:05:39 +00:00
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.