EXIF tool cannot remove some non-system metadata?

Started by jsx97, May 13, 2024, 05:51:11 AM

Previous topic - Next topic

jsx97

The following command works fine for me:

exiftool -all= image.jpg

Warning: ICC_Profile deleted. Image colors may be affected - image.jpg
    1 image files updated

It removes EXIF data, color profile, and everything else.

For example, I have a JPEG file created using Photo Booth on Mac. If I open its Get Info window and expand the More Info section, I see

     Keywords: Photo Booth
   Dimensions: 2350x1568
  Color space: RGB
Color profile: Color LCD
Alpha channel: No

After executing the
exiftool -all= image.jpg
command it becomes

   Dimensions: 2350x1568
  Color space: RGB
Color profile: sRGB IEC61966-2.1
Alpha channel: No

But if I try to remove EXIF data only, that is, without removing color profile (using the original, unchanged image), the Keywords: Photo Booth string is not removed, for some reason. Why is this?

exiftool -EXIF:all= image.jpg

    1 image files updated

exiftool -EXIF= image.jpg

    1 image files updated

     Keywords: Photo Booth
   Dimensions: 2350x1568
  Color space: RGB
Color profile: Color LCD
Alpha channel: No

Both the original and the
exiftool -EXIF= image.jpg
images are here: https://github.com/jsx97/test/blob/main/exiftool.zip

greybeard

the command exiftool -EXIF:all= image.jpg removes all the tags in the EXIF group

but the keywords aren't in the EXIF group in your image

if you run this command you will see which tags are within which groups:

exiftool -a -G1 -sort image.jpg

as you can see Keywords are in the IPTC group not the EXIF group

if you change EXIF to IPTC in your command you will delete the Keywords (and the other tags in the IPTC group)


StarGeek

This is FAQ #3.

All EXIF data is metadata, but not all metadata is EXIF data. EXIF is not a generic term for metadata, it is a very specific type of metadata which is mostly about the various camera settings used when a photo is taken.

Most other data that is added during processing, such as keywords or descriptions, will either be IPTC IIM/Legacy or XMP (which includes IPTC Core/Ext).
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

jsx97

Quote from: greybeard on May 13, 2024, 10:24:19 AMif you change EXIF to IPTC in your command you will delete the Keywords

Many thanks, Greybeard. But there is a very strange thing. After executing exiftool -IPTC:all= image.jpg, if I check the image using exiftool -a -G1 -sort image.jpg, I can see that Keywords has been removed. But if I check it using macOS Get Info window (Command-I), Keywords is still in place. (And no, it doesn't seem of macOS caches this information and fails to update it. Because exiftool -all= image.jpg works fine. Neither creating a copy, e.g., cp image.jpg image-copy.jpg, after the image has been processed, removes it.)

Phil Harvey

Yes, but if you'll check the ExifTool output you should see that the keywords exist in some other tag.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

The names that the macOS Get Info window are not necessarily the actual names of the tags in the file.  Additionally, it is most likely reading data from more than one tag.  It's a similar situation to Windows Properties (See the Windows Metadata post for a list of what tags Windows reads to fill the Properties window).

Additionally, the MacOS saves some data in the file system MDItem*/XAttr* tags. See the MacOS tags page. These are not automatically extracted by exiftool. You can add the -API RequestAll=2 option to tell exiftool to list those.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

jsx97

Many thanks, Phil and StarGeek. After removing it from both IPTC and XMP groups, the problem is solved.