From 9f70ef94fa57fcbdb51a785bf8b565ef2ae3d68a Mon Sep 17 00:00:00 2001 From: Romain Leroux Date: Mon, 21 Dec 2020 01:58:41 +0100 Subject: [PATCH] Add kmeans --- src/wand/magick.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wand/magick.rs b/src/wand/magick.rs index a1b7034..0ee0c77 100644 --- a/src/wand/magick.rs +++ b/src/wand/magick.rs @@ -849,6 +849,9 @@ impl MagickWand { /// Discard all but one of any pixel color. MagickUniqueImageColors => unique_image_colors() + + /// Applies k-means color reduction to the image. + MagickKmeansImage => kmeans(number_colors: size_t, max_iterations: size_t, tolerance: f64) ); get!(get_image_colors, MagickGetImageColors, size_t);