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

New Post: Color Profile is null. I might be missing something

$
0
0
The png coder automatically removes the color profile from your image. If you want to keep it you should set the following define before reading and before writing the image.
try
{
  magickImageDestination.SetDefine(MagickFormat.Png, "preserve-iCCP", true);
  magickImageDestination.Write(destinationStream);
}
catch (Exception e)
{
}

destinationStream.Seek(0, SeekOrigin.Begin);
MagickImage mi = new MagickImage();
mi.SetDefine(MagickFormat.Png, "preserve-iCCP", true);
mi.Read(destinationStream);

ColorProfile cp1 = mi.GetColorProfile();
p.s. You will get color coding when you put 'C#' behind ``` that starts a code block.

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>