This is an advanced pixel-art-to-SVG-path converter.
It takes advantage of fillrule="evenodd"
,
and for each color, returns a filled path with the fewest path segments
using an algorithm for finding Eulerian circuits.
Other approaches include a clever offset bounding box leveraging stroked paths,
path simplification,
and of course one <rect>
per pixel.