ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: gsoucy on November 13, 2022, 03:21:17 PM

Title: How to remove an embedded icc profile from a JPG image ?
Post by: gsoucy on November 13, 2022, 03:21:17 PM
Hello,

I need to remove the embedded profile from a JPEG image while keeping all other metadata.

I tried this command:

exiftool -icc_profile= -overwrite_original_in_place image.jpg

I got this:

  0 image files updated
  1 image files unchanged


When I run this:

exiftool -a -S -G0 -ColorSpace -InteropIndex -WhitePoint -PrimaryChromaticities -Gamma -ICC_Profile:all

I get this:

[EXIF] ColorSpace: Uncalibrated
[EXIF] InteropIndex: R03 - DCF option file (Adobe RGB)
[EXIF] WhitePoint: 0.313 0.329
[EXIF] PrimaryChromaticities: 0.64 0.33 0.21 0.71 0.15 0.06
[EXIF] Gamma: 2.2

I know that there is a profile because of a pop up when I open the file in photoshop:

"The embedded ICC Profile cannnot be used because the icc profile is invalid"

Also, the simple window tools "Quick Exif Editor" list all the tag and ICC Profile ( 0x8773) is in the list. When I delete that tag, photoshop does not complain anymore.

When I list all the tags from the image using exiftool, I do not see a profile or a 0x8773 tag.

Is there a way to remove the embeded color profile from a JPEG ?

Thank you!

Gilbert
Title: Re: How to remove an embedded icc profile from a JPG image ?
Post by: gsoucy on November 13, 2022, 03:30:42 PM
This command works in my case:

exiftool -interopindex= file.jpg


I have not played with color profiles much: why isn't this listed as a color profile and why that command does not work

exiftool -icc_profile= -overwrite_original_in_place image.jpg

?
Title: Re: How to remove an embedded icc profile from a JPG image ?
Post by: StarGeek on November 13, 2022, 04:04:31 PM
Can you share the file so we can take a closer look?

There are color management tags that exist in the EXIF group that are not part of an ICC_Profile.  InteropIndex is one of them.  The exiftool shortcut tag, ColorSpaceTags, includes that tag, the ICC_Profile, as well as the EXIF:ColorSpace and EXIF:Gamma tags.
Title: Re: How to remove an embedded icc profile from a JPG image ?
Post by: gsoucy on November 14, 2022, 07:57:55 AM
Here is the image (I cleared the image content since it does not matter in this case).

exiftool :  11.01
Centos  7.9

file.jpg
Title: Re: How to remove an embedded icc profile from a JPG image ?
Post by: Phil Harvey on November 14, 2022, 08:14:42 AM
Without reading the specification, I would think that the ColorSpace tag should be set to "sRGB" to be consistent with the InteropIndex.

- Phil
Title: Re: How to remove an embedded icc profile from a JPG image ?
Post by: Phil Harvey on November 14, 2022, 08:21:06 AM
Actually, looking at my samples, images which use the Gamma tag look like this:

[ExifIFD]       Color Space                     : Uncalibrated
[ExifIFD]       Gamma                           : 2.2
[InteropIFD]    Interoperability Index          : R03 - DCF option file (Adobe RGB)

So maybe ColorSpace should be left at Uncalibrated, and InteropIndex should be set to "Adobe RGB":

exiftool -interopindex="Adobe RGB" file.jpg

- Phil