px2svg
px2svg copied to clipboard
Threshold code broken (currently disabled)
There’s something broken with the threshold code. The problem: anything above a zero threshold makes it likely that the produced SVG will be massively smeared out and unrecognizable. This may be some sort of runaway consecutive-pixels thing, but I’m not certain. That’s just a guess based on the visual results.
As a workaround, at present, there are no threshold checks made, so every color comparison requires an exact match; if not, a new rect is created. It would be nice to restore the threshold code. If anyone wants to take a whack at it, please feel free. It may be some time before I get to the point of being able to tackle it in detail.
Off the top of my head (and a few years late), shouldn't checkThreshold be getting absolute values for each color channel calculation? Color1.R (0) - Color2(255) == -255.
Will check this out when I get home.
No worries about lateness! I’d be happy to have a fix for this. Let me know what you find out—thanks!