Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: ImageMagick reads/converts TrueColor TIF as Grayscale?

$
0
0
Viewpoint 1 - The developer perspective

Your comments made me dig into the code and figure out what is happening. It turns out that requesting the ColorType changes the ColorType and ColorSpace. I have modified ImageMagick and moved this to a separate method. This method will be called DetermineColorType and available in the next version of Magick.NET. This means that image.ColorType will return the original ColorType instead of the automatically detected ColorType. But this will still result in an output image with a gray ColorType. You can prevent this by explicitly telling ImageMagick to preserve the ColorType:
using (MagickImage image = new MagickImage(@"F:\wireframe.tif"))
{
  image.PreserveColorType = true;
  /*
    This will internally do the following statement that sets an internal option to explicitly use this ColorType.
    image.ColorType = image.ColorType;
  */
  image.Write(@"F:\same_wireframe.tif");
}
Viewpoint 2 - The theoretical perspective or as science guys talk ( also not me :) )

I am also not a color expert so my explanation may sound confusing. I am also still learning. If you want some more information on how ImageMagick interprets color spaces you should visit the following page: http://www.imagemagick.org/Usage/color_basics. Anthony can explain it much better then me.

Viewing all articles
Browse latest Browse all 3693

Trending Articles