(median-cut l)
Takes a list and sorts it by the elements with the greatest range and splits it at the median.
Takes a list and sorts it by the elements with the greatest range and splits it at the median.
(quantize img n-colors)
Quantize an image to n colors. The underlying filter builds an octree to determine a set of colors that will produce minimal distortion, but these will be different colors for each image.
Quantize an image to n colors. The underlying filter builds an octree to determine a set of colors that will produce minimal distortion, but these will be different colors for each image.
(quantize-px-range px range)
Quantize 32-bit ARGB(8888) pixels to RGB(222) format. On a little-endian machine this means we use the right most 6 bits
Quantize 32-bit ARGB(8888) pixels to RGB(222) format. On a little-endian machine this means we use the right most 6 bits
(quantized-palette img)
(quantized-palette img n)
Takes an image and returns a pallette of colors that could be used to quantize the image using the median-cut algorithm. Note that n must be a power of 2.
Takes an image and returns a pallette of colors that could be used to quantize the image using the median-cut algorithm. Note that n must be a power of 2.
(range-quantize img range)
quantize the image so that each channel only has range integer precision. So if range is 4, you are only using 2 bits per channel. If range is 8, you are using 3 bits per channel
quantize the image so that each channel only has range integer precision. So if range is 4, you are only using 2 bits per channel. If range is 8, you are using 3 bits per channel
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close