Cannot remove or write to DateTimeOriginal tag

Started by Andreas Spindler, April 18, 2012, 10:55:52 AM

Previous topic - Next topic

Andreas Spindler

Hi! I need help with some 10+ year old images which, this is for sure, contain some prehistoric Exif-data.

    $ exiftool -ver
    8.75
    $ exiftool -time:all -a -G0:1 -s picture.jpg
    [File:System]  FileModifyDate         : 2012:04:18 15:22:03+02:00
    [EXIF:IFD0]    ModifyDate             : 2010:08:14 21:00:45
    [EXIF:ExifIFD] CreateDate             : 1998:06:23 12:00:46
    [APP12:PictureInfo] DateTimeOriginal  : -1


As one can see EXIF:DateTimeOriginal is missing but there is EXIF:CreateDate. First I want to remove the mysterious DateTimeOriginal entry, then copy CreateDate to DateTimeOriginal. But none of these commands worked:

$ exiftool -DateTimeOriginal= picture.jpg
$ exiftool '-DateTimeOriginal<CreateDate' picture.jpg
$ exiftool '-EXIF:DateTimeOriginal<CreateDate' picture.jpg


DateTimeOriginal remains -1.
Am I stressing the forensic capabilities of exiftool? What is APP12:PictureInfo anyway?


Phil Harvey

Read the APP12 PictureInfo Tag Name documentation for information about these tags.  ExifTool does not yet write this information.

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

Andreas Spindler

Ok, thank you! Actually:

exiftool '-EXIF:DateTimeOriginal<EXIF:CreateDate' picture.jpg

does what I want now, and I can live with two DateTimeOriginals. For some reason, exiftool priorizes the DateTimeOriginal of APP12:

exiftool -'FileModifyDate<DateTimeOriginal' picture.jpg
Warning: Invalid date/time ...
    1 image file update


The file modification time, however, is set correctly to EXIF:DateTimeOriginal. I got many of these warnings
and it took me a while to find out where they come from. Exiftool seems to do the right thing anyway, as it ignores the -1 date,
so it is probably ok to suppress the warning with -q -q?


Andreas Spindler

Actually -q -q also suppress the summary, e.g. "n files updated" which I find quite informative.

Is there a way to suppress warnings but get the summary?

Phil Harvey

Quote from: Andreas S. on April 18, 2012, 12:39:17 PM
does what I want now, and I can live with two DateTimeOriginals. For some reason, exiftool priorizes the DateTimeOriginal of APP12:

This is because the by default the last extracted value takes priority.  I can tweak this though, and will lower the priority of the APP12 tags in the next version.

Quote
exiftool -'FileModifyDate<DateTimeOriginal' picture.jpg
Warning: Invalid date/time ...
    1 image file update

In this case, you could do this to avoid the warning:

exiftool -'FileModifyDate<exif:DateTimeOriginal' picture.jpg

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

Andreas Spindler

Thank you. I think presently exiftool is one of the the most useful and best supported open-source programs we have.

pb

Quote from: Andreas S. on April 19, 2012, 03:16:10 AM
Thank you. I think presently exiftool is one of the the most useful and best supported open-source programs we have.
I would not confine that statement to only open-source.