Color quantization: Difference between revisions
Content added Content deleted
m (Don't deduplicate colors/pixels) |
(Added Sidef) |
||
Line 1,952: | Line 1,952: | ||
</lang> |
</lang> |
||
=={{header|Sidef}}== |
|||
<lang ruby>require('Image::Magick') |
|||
func quantize_image(n = 16, input, output='output.png') { |
|||
var im = %O<Image::Magick>.new |
|||
im.Read(input) |
|||
im.Quantize(colors => n, dither => 1) # 1 = None |
|||
im.Write(output) |
|||
} |
|||
quantize_image(input: 'Quantum_frog.png')</lang> |
|||
=={{header|Tcl}}== |
=={{header|Tcl}}== |