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
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)
This is FAQ #3 (https://exiftool.org/faq.html#Q3).
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).
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.)
Yes, but if you'll check the ExifTool output you should see that the keywords exist in some other tag.
- Phil
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 (https://exiftool.org/forum/index.php?topic=6591.msg32875#msg32875) 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 (https://exiftool.org/TagNames/MacOS.html). These are not automatically extracted by exiftool. You can add the -API RequestAll=2 option (https://exiftool.org/ExifTool.html#RequestAll) to tell exiftool to list those.
Many thanks, Phil and StarGeek. After removing it from both IPTC and XMP groups, the problem is solved.