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

Do not jp2 16bit Gray Scale conversion.

Sep 15, 2015 at 3:53 AM
Edited Sep 15, 2015 at 3:55 AM
       MagickReadSettings settings = new MagickReadSettings();
        settings.ColorSpace = ColorSpace.Gray;


        using (MagickImage image = new MagickImage("제목 없음-4.bmp", settings))
        {
            MagickImage mask = image.Clone();
            mask.Depth = 16;
            mask.ColorSpace = ColorSpace.Gray;

            mask.ClassType=ClassType.Direct;

            mask.Write("finalPlz.jp2");

        }

I have tried converting the same code as above. The color space creates an image file that has still rgb channel, but the Gray Scale.
I want one channel, 16-bit grayscale images.
Rather strange thing is jp2 extension, if the extension saved as png 16bit 1-channel grayscale image is created normally.
In order to solve the problem and need your help.
Sep 15, 2015 at 11:49 AM
How are you checking that your jp2 file has more then 1 channel?
Sep 16, 2015 at 1:17 AM
I opened the jp2 files created in Photoshop.
So, it was confirmed that the RGB channels that contain the files generated by the jp2 Magick.net.
I intend that this was not GrayScale 1-channel image file.
Sep 16, 2015 at 1:16 PM
I can confirm this is a bug in ImageMagick/Magick.NET I just pushed a patch to the GIT repository of ImageMagick to fix this. The next release of Magick.NET will include this fix.
Sep 22, 2015 at 3:07 AM
Thanks for the quick fix.
This problem has been fixed in version Magick.NET 7.0.0.0019.