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?".
Posts: 21
Joined: 2019-10-29T07:03:33-07:00
Authentication code: 1152

Do not save ICC Profile in resulting file

Post by VasyaIvonov2 »

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...
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?

Posts: 13034
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 »

I suggest the equivalent of the command-line option "+profile *". See ... hp#profile . I don't know what that is in C#.
snibgo's IM pages: