magickKmeansImage method
MagickKmeansImage() applies k-means color reduction to an image. This is a colorspace clustering or segmentation technique.
This method runs inside an isolate different from the main isolate.
numberColors
: number of colors to use as seeds.maxIterations
: maximum number of iterations while converging.tolerance
: the maximum tolerance.
Implementation
Future<bool> magickKmeansImage({
required int numberColors,
required int maxIterations,
required double tolerance,
}) async =>
await _magickCompute(
_magickKmeansImage,
_MagickKmeansImageParams(
_wandPtr.address,
numberColors,
maxIterations,
tolerance,
),
);