postcss-resemble-image icon indicating copy to clipboard operation
postcss-resemble-image copied to clipboard

Offer quantization-based algorithm as an alternative

Open Lorti opened this issue 9 years ago • 4 comments

I have started implementing a second algorithm in the proposed-algorithm branch, as described in creating center-weighted linear gradients with variable-width stops.

As December is a terribly busy month I have opened this ticket to collect thoughts on GitHub rather than Twitter.

What work is still to be done on the branch?

  • [ ] Finding a name for the second algorithm, preferably a single word.
  • [ ] Making the number of extracted color stops variable, as well as the size of the color palette, and creating options for both.
  • [ ] Exporting both algorithms as functions and making opts.algorithm accept a function.

Lorti avatar Dec 21 '16 09:12 Lorti

Sounds good to me, I think we can probably extract out the algorithms into a separate module afterwards? 😄

ben-eb avatar Dec 21 '16 16:12 ben-eb

Separate npm modules? Great idea, but then we have to find yet another name! 😄

Lorti avatar Dec 21 '16 16:12 Lorti

I was thinking resemble-image which is currently free. 😄

ben-eb avatar Dec 21 '16 16:12 ben-eb

Quick Update There is now a resemble-image package with just the two algorithms. I hope to find some time in the next month or so to open a pull request. If someone else can do it earlier there'd be no hard feelings, though ;)

Lorti avatar Feb 02 '17 07:02 Lorti