Do not save ICC Profile in resulting file

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
VasyaIvonov2
Posts: 12
Joined: 2019-10-29T07:03:33-07:00
Authentication code: 1152

Do not save ICC Profile in resulting file

Post by VasyaIvonov2 » 2019-11-07T02:22:36-07:00

Hi everyone! I have the next code (C#):

Code: Select all

using (MagickImage image = new MagickImage(srcFilePath))
{
       image.AddProfile(srcProfile, true); //Source ICC Profile
       image.AddProfile(ColorProfile.SRGB); //Target ICC Profile
       //I want to convert from srcProfile to targetProfile and everything is OK, but...
       image.Write(dstFilePath);
}
All is right, that code does what i want: convert from srcProfile to targetProfile, but in resulting file's exeif metadata there is target ICCProfile's information. I want not save it at all. Is there a possibility to do so without re-open and save file one more time?

snibgo
Posts: 12300
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Do not save ICC Profile in resulting file

Post by snibgo » 2019-11-07T04:45:44-07:00

I suggest the equivalent of the command-line option "+profile *". See https://www.imagemagick.org/script/comm ... hp#profile . I don't know what that is in C#.
snibgo's IM pages: im.snibgo.com

Post Reply