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

前端 未结 1 983
攒了一身酷
攒了一身酷 2021-01-14 08:27

I convert image based on CMYK to image based on RGB in the following way using ImageMagick(command Line) :

convert.exe -profile icc:JapanColor2001Coate         


        
相关标签:
1条回答
  • 2021-01-14 08:28

    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.

    0 讨论(0)
提交回复
热议问题