Files
vectorcraft/crates
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
..