News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

File change between read and write meta data - Is it bad?

Started by BenBurrows, July 02, 2014, 03:43:39 AM

Previous topic - Next topic

BenBurrows

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)


Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BenBurrows