How to set profile using Magick.net in the same way using Image Magick?

若如初见. 提交于 2019-12-02 03:07:08
dlemstra

You should first add the old profile and then the new profile:

using (MagickImage image = new MagickImage("input.jpg"))
{
  // Tell ImageMagick what we're starting with
  image.AddProfile(new ColorProfile(@"C:\Path\JapanColor2001Coated.icc"));

  // Tell it to convert - the details are handled for you by the library
  image.AddProfile(ColorProfile.SRGB);

  // You're done. Save it.
  image.Write("output.jpg");
}

Another example here: https://magick.codeplex.com/wikipage?title=Convert%20image

Notice in the linked example they're converting from a standard CMYK, which means you don't need to load a custom icc profile - the standard CMYK is already in Magick.net, as ColorProfile.USWebCoatedSWOP.

If you need more help feel free to start a discussion here: https://magick.codeplex.com/discussions. If you post a message there please include a link to your source image.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!