Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
- Posts: 1
- Joined: 2016-03-25T13:46:22-07:00
- Authentication code: 1151
I can't convert a jpg image to png, grayscale and 8 bit depth.
Code: Select all
// read from disk...
image.Format = MagickFormat.Png;
image.ColorType = ColorType.Grayscale;
image.Depth = 8;
The result is always 24 bit depth...
I've lost something? where is my mistake? bug?
It seems this https://www.imagemagick.org/discourse-s ... hp?t=27766
Thanks in advance
workaround: ...change image.Format in MagickFormat.Png8.
- Posts: 1569
- Joined: 2013-05-04T15:28:54-07:00
- Authentication code: 6789
Setting image.Format to MagickFormat.Png8 is not a workaround. This is how you tell the png writer that you want an 8 bit image.