magickOrderedDitherImage method
MagickOrderedDitherImage() performs an ordered dither based on a number of pre-defined dithering threshold maps, but over multiple intensity levels, which can be different for different channels, according to the input arguments.
This method runs inside an isolate different from the main isolate.
Sending invalid parameters will cause an invalid state and may crash the app, so you should make sure to validate the input to this method.
thresholdMap
: A string containing the name of the threshold dither map to use, followed by zero or more numbers representing the number of color levels tho dither between. Any level number less than 2 is equivalent to 2, and means only binary dithering will be applied to each color channel. No numbers also means a 2 level (bitmap) dither will be applied to all channels, while a single number is the number of levels applied to each channel in sequence. More numbers will be applied in turn to each of the color channels. For example: "o3x3,6" generates a 6 level posterization of the image with a ordered 3x3 diffused pixel dither being applied between each level. While checker,8,8,4 will produce a 332 colormaped image with only a single checkerboard hash pattern (50 grey) between each color level, to basically double the number of color levels with a bare minimum of dithering.
Implementation
Future<bool> magickOrderedDitherImage(String thresholdMap) async =>
await _magickCompute(
_magickOrderedDitherImage,
_MagickOrderedDitherImageParams(
_wandPtr.address,
thresholdMap,
),
);