ExifTool Forum

ExifTool => The Image::ExifTool API => Topic started by: BenBurrows on July 02, 2014, 03:43:39 AM

Title: File change between read and write meta data - Is it bad?
Post by: BenBurrows on July 02, 2014, 03:43:39 AM
Hi,
Is it bad/wrong/dangerous to modify a file between reading the exif data with exiftool and writing modified data with exiftool?
I created a script outlined below (which appears to work just fine in all my tests).
Is this a bad thing to do, am I just lucky getting away with it, will it bite my ass at some point?

Reads exif data
- (specifically to this question, orientation but maybe other stuff too)
Calls jpegtran to rotate the image losslessly if required
- (which obviously changes the file, it rotates it, makes minor header/metadata updates and drops any preview image)
Updates exif data
- (specifically to this question, orientation but maybe other stuff too)

Title: Re: File change between read and write meta data - Is it bad?
Post by: Phil Harvey on July 02, 2014, 07:18:13 AM
In theory, there should be nothing wrong with this.  In practice, many other utilities corrupt maker note information, but I don't think that jpegtran is one of them.

- Phil
Title: Re: File change between read and write meta data - Is it bad?
Post by: BenBurrows on July 03, 2014, 02:56:41 AM
Great, thanks. Thats good to know.