Conversation
|
Oh weird, this Note that the encoder part of this lib is alpha and almost untested. It has serious performance issues, so I did not try to get it into better shape. Instead I might release a wasm based encoder soon (half done), which is like 10+ times faster, includes a decent quantizer already and has a very low code and memory footprint. It also uses https://github.com/jerch/inwasm, which makes the wasm parts much easier to deal with. From a conceptual side - you should not rely on that "dumb" nearest color match implementation at all, as it does square root distance matching for every color against all colors of the given palette w'o any palette correction. Thats very very wasteful, and the palette is almost always subpar. Better use a quantizer to get an optimized palette, that is closer to the original colors. |
|
Thanks for the info, and I'm happy to hear you're working on a faster version! For my limited purposes though, this one is plenty fast enough. I got it to build, though I had to use a newer version of |
The nearest-matching palette behavior was removed in b6b107c
This change puts it back.
I haven't managed to build it yet so I haven't tested it. I will do that next.