Hi all,
Searching all around, I've collected examples and assembled the following syntax, aimed to filter out the most of the metadata, keeping the listed ones.
exiftool -all= -tagsfromfile @ -ImageWidth -ImageHeight -DateTimeOriginal -ExposureProgram -ISO -CameraISO -AutoISO -ShutterSpeedValue -FocalLength -ApertureValue -artist -Keywords -RegionAppliedToDimensionsH -RegionAppliedToDimensionsUnit -RegionAppliedToDimensionsW -RegionName -RegionType -RegionAreaH -RegionAreaUnit -RegionAreaW -RegionAreaX -RegionAreaY testimage1.jpg
It seems to work in the tests I've made. But I'm not sure if it's a good way to handle such a clean-up. Does this code looks safe? Is there a better way to handle it?
Thanks in advance
Bruno
I would recommend this to preserve the color space tags (as per FAQ 32 (https://exiftool.org/faq.html#Q32)).
Also you may want to add Subject to the list of tags because it is the modern XMP version of the old IPTC Keywords tag. And it would be better to copy the region as a structure instead of as flattened tags (to preserve the correlations if there are multiple regions).
exiftool -all= --icc_profile:all -tagsfromfile @ -colorspacetags -ImageWidth -ImageHeight -DateTimeOriginal -ExposureProgram -ISO -CameraISO -AutoISO -ShutterSpeedValue -FocalLength -ApertureValue -artist -Keywords -Subject -RegionInfo testimage1.jpg
There may be some other tags you should add, depending on what tags are important to you.
- Phil
Thank you Phil!