ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Jan2 on January 07, 2023, 09:15:34 AM

Title: Pre-check if a specific change would fail?
Post by: Jan2 on January 07, 2023, 09:15:34 AM
Hi,
consider an app that offers specific options: e.g. adding EXIF timestamps or gps location data to images.
Ideally, these options should only be configurable if the changes can be saved later.

So I want to pre-check the files. I tried:
exiftool -validate -warning -m -a /folder/
to only get the major warnings.

At first I thought (or at least hoped) that a major warning is equivalent to "No change possible". But that is not true:
E.g. it IS possible to add gps data to sample files that show warnings like these:

Warning : Non-standard format (string) for ExifIFD 0x9000 ExifVersion
Warning : Non-standard count (1) for ExifIFD 0x9101 ComponentsConfiguration
Warning : Missing required JPEG IFD1 tag 0x011a XResolution


Is there another way to narrow this down, or is the only reliable way to try a change "for real"?
(That would mean: LOTS of "unnecessary" write activity, every time ... So I would like to avoid that.)

Thanks a lot!
Title: Re: Pre-check if a specific change would fail?
Post by: Phil Harvey on January 07, 2023, 10:13:01 AM
The only way to do what you is would be to do a dry-run of writing the tags to the file.  Some things like makernote tags can only be written if they already exist in the file, so there is no way to tell without parsing the file, and the best way to do this is to actually try to write it.  You could write it to a temporary directory.

- Phil