Getting error "Invalid format (string) for IFD0 ExifOffset"

Started by MiYandi, September 03, 2021, 04:44:49 AM

Previous topic - Next topic

MiYandi

Hello,

i've exported my images with Adobe Photoshop Elements and try now to adjust the modifydate with the createdate when I took the picture.

To get a better picture of my problem here are the commands I used.

First I valided which datetime must be the right one:

exiftool.exe -time:all -g1 -a -s .\IMG_1860.jpg
---- System ----
FileModifyDate                  : 2021:08:23 23:54:45+02:00
FileAccessDate                  : 2021:08:23 23:54:45+02:00
FileCreateDate                  : 2021:08:23 23:54:45+02:00
---- IFD0 ----
ModifyDate                      : 2021:08:23 23:54:44
---- XMP-xmp ----
MetadataDate                    : 2021:08:23 23:54:44+02:00
ModifyDate                      : 2021:08:23 23:54:44+02:00
CreateDate                      : 2020:08:08 23:46:35.9+02:00
---- XMP-exif ----
DateTimeOriginal                : 2020:08:08 23:46:35+02:00
---- XMP-photoshop ----
DateCreated                     : 2020:08:08 23:46:35.90
---- XMP-xmpMM ----
HistoryWhen                     : 2021:08:23 20:36:20+02:00, 2021:08:23 23:33:28+02:00
---- IPTC ----
DateCreated                     : 2020:08:08


After that I used the following command which exited with an error.


exiftool.exe -ModifyDate<XMP-photoshop:DateCreated .\IMG_1860.jpg
Warning: Wrong format (string) for IFD0 0x8769 ExifOffset - ./IMG_1860.jpg
Error: Invalid format (string) for IFD0 ExifOffset - ./IMG_1860.jpg
    0 image files updated
    1 files weren't updated due to errors


It seems like the problem is, that the source string contains milliseconds and the destination can only handle a date time string without milliseconds or a time zone.

Can someone help me?

Thank you

StarGeek

The millisecond component will not affect the command.  Exiftool will only add the parts of a timestamp that the tag allows.  For example:
C:\>exiftool -g1 -a -s -DateCreated y:\!temp\Test4.jpg
---- XMP-photoshop ----
DateCreated                     : 2020:08:08 23:46:35.90

C:\>exiftool -P -overwrite_original "-ModifyDate<XMP-photoshop:DateCreated" y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -time:all --system:all -g1 -a -s y:\!temp\Test4.jpg
---- IFD0 ----
ModifyDate                      : 2020:08:08 23:46:35
---- XMP-photoshop ----
DateCreated                     : 2020:08:08 23:46:35.90


One problem with your listed command is that you are not enclosing the tag copy operation with quotes to prevent shell redirection, i.e. use "-ModifyDate<XMP-photoshop:DateCreated" instead of -ModifyDate<XMP-photoshop:DateCreated.  On Windows, that results in a The system cannot find the file specified in my case, but you don't mention your OS.  I don't think that's the main problem, though I could be wrong.

The error you get is Invalid format (string) for IFD0 ExifOffset.  That seems to indicate that there is something corrupt in formatting of the EXIF block in the file.  Normally this is just a pointer to more of the EXIF data.

Try running this command on the file to see what problems there might be.
exiftool -g1 -a -s -warning -validate .\IMG_1860.jpg
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

MiYandi

Hello,

I'm using Win10

using the enclosures leading to the same error:
PS D:\Photo> exiftool.exe -ModifyDate<XMP-photoshop:DateCreated .\IMG_1860.jpg
Warning: Wrong format (string) for IFD0 0x8769 ExifOffset - ./IMG_1860.jpg
Error: Invalid format (string) for IFD0 ExifOffset - ./IMG_1860.jpg
    0 image files updated
    1 files weren't updated due to errors

PS D:\Photo> exiftool.exe "-ModifyDate<XMP-photoshop:DateCreated" .\IMG_1860.jpg
Warning: Wrong format (string) for IFD0 0x8769 ExifOffset - ./IMG_1860.jpg
Error: Invalid format (string) for IFD0 ExifOffset - ./IMG_1860.jpg
    0 image files updated
    1 files weren't updated due to errors


I also executed your command with the following result:
PS D:\Photo> exiftool -g1 -a -s -warning -validate .\IMG_1860.jpg
---- ExifTool ----
Warning                         : Wrong format (string) for IFD0 0x8769 ExifOffset
Warning                         : IFD0:ExifOffset is missing the corresponding offset tag
Warning                         : [minor] Boolean value for XMP-crs:ConvertToGrayscale should be capitalized
Warning                         : [minor] Boolean value for XMP-crs:OverrideLookVignette should be capitalized
Warning                         : [minor] Boolean value for XMP-crs:HasSettings should be capitalized
Warning                         : [minor] Boolean value for XMP-crs:HasCrop should be capitalized
Warning                         : [minor] Boolean value for XMP-crs:AlreadyApplied should be capitalized
Warning                         : [minor] Boolean value for XMP-exif:FlashFired should be capitalized
Warning                         : [minor] Boolean value for XMP-exif:FlashFunction should be capitalized
Warning                         : [minor] Boolean value for XMP-exif:FlashRedEyeMode should be capitalized
Warning                         : Missing required JPEG GPS tag 0x0000 GPSVersionID
Validate                        : 11 Warnings (8 minor)


Thank you

StarGeek

Quote from: MiYandi on September 05, 2021, 06:16:43 AM
PS D:\Photo> exiftool -g1 -a -s -warning -validate .\IMG_1860.jpg
---- ExifTool ----
Warning                         : Wrong format (string) for IFD0 0x8769 ExifOffset
Warning                         : IFD0:ExifOffset is missing the corresponding offset tag

All the other warnings can be ignored.  These are the two that are the problem.  Somehow, the EXIF block is corrupt.  I would suggest running the command in FAQ #20 on the file but it's quite possible some EXIF metadata will be lost. 

Just don't run that command on a RAW file type (NEF, CR2/3, ARW, etc)
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).