Hello, I have the following ImageMagick commands to convert an image to grayscale and then dither it to 4 gray levels, which I'm trying to perform in Magick.NET:
convert image.png -colorspace GRAY png:out.png
convert out.png -ordered-dither h6x6a,4 png:dither.png
So here's what I have (I'm passing in an existing stream to write to): public void Poster1(Stream stream)
{
using (var image = new MagickImage(@"image.png"))
{
image.ColorSpace = ColorSpace.Gray;
image.OrderedDither("h6x6a,4", Channels.Composite);
image.Write(stream);
}
}
However, after the OrderedDither operation, my image has only black and white dithering instead of the expected 4 levels of gray. Is it possible to get an equivalent operation in Magick.NET? Thanks!