News:

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

Main Menu

Preserve image file as much as possible

Started by Jesco, May 08, 2012, 06:38:09 AM

Previous topic - Next topic

Jesco

Hello,

I just started to use ExifTool (v8.91) to change the time tags in a number of files (jpg and CR2 Canon Raw-Files). I used the command:
exiftool -AllDates-=1 .
I observe that both filetypes are quite heavily restructured although I think this modification could be made with changing only a few bytes of the files. According to ExifTool's documentation it seems that this is the usual behavior and results in valid files without data loss. However, I would like to ask for an option 'preserveAsMuchAsPossible' so that ExifTool would only make minimal changes to the original file. Is that a reasonable wish that could be implemented?

The reason for that wish is that I would prefer if the image files would be equal as if I had set the correct time in the camera already. E.g. as mentioned in the post Preview Image changes after timeshift in CR2 IrfanView had a problem when the raw files differ from the way that the Canon cameras write them. I fully understood that this is rather a problem in IrfanView than a bug in ExifTool because IrfanView just did not correctly implemented the CR2 standard. But still I have to fear that at some stage I might want to use a software that would not work for all the images I modified with ExifTool. Currently I prefer to rather not make this little time correction and leave my files unchanged.

Jesco

Phil Harvey

Hi Jesco,

This feature has been on the wish list for a long time.  What you really need is a much less powerful utility dedicated to only one thing: changing date/time values without changing anything else.  ExifTool is much more powerful than this, and the file must be restructured to a certain extent if you want the ability to add or delete tags, or change the length of existing values.  Implementing this in ExifTool essentially means writing a new utility and building it into ExifTool, which I haven't been able to get motivated to do.

- 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 ($).

Jesco

Hi Phil,

thanks for your answer. Can you recommend an existing tool that does this?

Out of curiosity: is there a particular difficulty in writing a software that imitates the structure how e.g. Canon writes their files or is it just the way ExifTool has been written so far? I understand that if e.g. a tag is added a number of pointers have to modified so changes all over the file have to be made. But apart from that, wouldn't it be sufficient to just follow the writing order of a particular camera manufacturer to leave most things unchanged?

Jesco

Phil Harvey

Hi Jesco,

Quote from: Jesco on May 08, 2012, 08:38:30 AM
thanks for your answer. Can you recommend an existing tool that does this?

I don't know of any tool that does this.

QuoteOut of curiosity: is there a particular difficulty in writing a software that imitates the structure how e.g. Canon writes their files or is it just the way ExifTool has been written so far? I understand that if e.g. a tag is added a number of pointers have to modified so changes all over the file have to be made. But apart from that, wouldn't it be sufficient to just follow the writing order of a particular camera manufacturer to leave most things unchanged?

In general, it would be very difficult to implement your suggestion since the details of the structure are unique to the specific camera model, and even sometimes different for different firmware versions of the same model.

- 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 ($).

BogdanH

Hi Jesco,

I would say, that making a tool, which only changes existing Exif DateTime values (and nothing else!) would be very easy to make for every programmer familiar with image file formats and Exif metadata. Not that I'm pretedning being  genious programmer, but if I would need such tool, I believe I could do it in few hours.
The thing is: it isn't worth.
ExifTool handles metadata by the book, so why bother. I'm using it for many years for my CR2 files and it never happened I would have a problem. That is, if some software has a problem after ExifTool modifies metadata, then that software must have problem with metadata in general.
But I can understand you (to some degree), that you are only trying to be carefull. It's your decission.

Bogdan