This project has moved and is read-only. For the latest updates, please go here.

Trying to perform OrderedDither with 4 levels

Oct 12, 2016 at 10:03 PM
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);
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!
Oct 13, 2016 at 8:31 AM
I fixed a bug in OrderedDither inside ImageMagick a couple days ago. This did not work correctly. I will update to the latest version of ImageMagick this weekend and test your code again. I will publish a new release once this is fixed.
Oct 13, 2016 at 6:21 PM
Thanks so much! I'm pretty new to all this so wasn't sure whether I was missing something obvious.. I'll keep an eye out for the new version.
Oct 25, 2016 at 3:20 PM
Confirmed that issue is fixed with version, thanks again!
Oct 25, 2016 at 6:05 PM
Thanks for coming back here to let everybody know :)