Welcome Guest (Log in)

ImagePalette_v101

StarStarStarStarStar
Browser widget (24) | Images (23) | LC 9 (11)
General
Expander triangle
  • Author
  • Rating
  • Type
  • Revision
  • Downloaded
  • Updated
  • Hermann Hoch
  • StarStarStarStarStar
  • Stack
  • 2
  • 317 Times
  • 24 June 2019
ImagePalette_v101
## v1.0.0 2019-06-24 ... First version on LiveCodeShare (Sample stacks)
## v1.0.1 2019-06-24 ... Removed highlighting bug with the color list (thanks bn!)

>>> The stack needs LC 9. It also runs in LC 8 but up to 10 times slower. <<<

The stack creates a color palette from any image. You set the number of colors (2-256) of the palette.
Such palettes are often used to create "harmonic" designs of drawings/posters or for creating web pages.

You can see the "quantized" image with that palette, see
https://en.wikipedia.org/wiki/Color_quantization
The quantized image is computed built-in or by using LC's "export image with palette" with the computed palette.

The stack uses the excellent javaScript library rgbQuant
https://github.com/leeoniya/RgbQuant.js/
via a browser widget. The library is included in the stack.

If you have a decent GPU then around 1-2 seconds are needed for images of medium screen size (1920x1080).
License MIT ( see https://en.wikipedia.org/wiki/MIT_License )
Ajax Loader
Tags
Expander triangle
User Comments
Expander triangle