ExifTool: Remove all meta data except specific tags
I am trying to remove all meta data from JPEG files except common photo tags as listed with exiftool -common (camera model, shutter speed, aperture, ISO, etc.) lens model, color space and embedded ICC profile.
Using the answer from question exiftool: delete exif data but preserve some specific tags, the following commands are produced. The problem is that both of them result in removing shutter speed, aperture and the embedded ICC profile as can be verified using exiftool with the respective flags.
exiftool -all= -tagsFromFile @ -common -LensModel -ColorSpace -icc_profile:all original.JPG
exiftool -all= -tagsFromFile @ -common -aperture -ShutterSpeed -LensModel -ColorSpace -icc_profile:all original.JPG
They both produce warning:
Warning: Sorry, filesize is not writable
Are the commands malformed or is this an ExifTool bug? This behaviour is confirmed on ExifTool version 10.40.
Top Answer/Comment:
The Common shortcut tag is more of a data collection tag and it really isn't meant for copying info from one file to another (see Shortcut tags for list of tags is contains). Many of that tags covered by that shortcut are either filesystem tags (FileSize), MakerNotes tags (Quality), or Composite tags (Aperture, ShutterSpeed). In the case of FileSize, you obviously can't arbitrarily change the size of the destination file, thus the filesize is not writable error.
In the case of Makernotes tags, they cannot be copied or created individually. It has to be copied as a block with -MakerNotes. You may not have been trying to copy the Quality tag, but this point becomes relevant when it comes to Composite tags.
Composite tags aren't tags that are in the file. They are derived from multiple other tags. Aperture and ShutterSpeed are two examples. You can't copy them to another file because individually, they don't exist. You have to copy the tags that they're based upon. Aperture is based upon either FNumber or ApertureValue, depending upon which is actually in the file. ShutterSpeed is based upon ExposureTime, ShutterSpeedValue, and/or BulbDuration. To correctly "copy" Aperture and ShutterSpeed, you have to copy the above tags that they're based upon. And some of those tags may be only in the MakerNotes, so you would have to copy the entire Makernotes
ICC_Profile is considered an "unsafe" tag and will not be copied unless it is explicitly listed. You probably have to copy it as a block with -ICC_Profile if -ICC_Profile:all doesn't work as some of the individual tags in the ICC_Profile are not writable.
tl;dr: There's nothing wrong with the exiftool command, it just doesn't do what you think it does.
상단 광고의 [X] 버튼을 누르면 내용이 보입니다