A fix to the perennial: Error reading StripOffsets data in IFD1

Started by Andy Bell, July 11, 2024, 10:23:20 AM

Previous topic - Next topic

Andy Bell

Hello!

I am on a trial of iMatch and enjoying it greatly. When performing Commands> Perform Write-Back> Selected Files, I see an error in the Output Panel:

Error: Error reading StripOffsets data in IFD1

I've read a number of messages in the forums and found no remedy to this within iMatch. I believe this is a shortcoming worthy of implmenting formally, since I managed to fix the issue using ExifTool with my own python script. Essentially, I attempted to change a piece of metadata in a file, but if the call to the exiftool to do this failed, I then used the following exiftool command to do a really good job in fixing it:

perlroot/perl.exe exifroot/exiftool.pl -exif:all= -tagsfromfile @ -exif:all -thumbnailimage -unsafe -icc_profile "path-to-file"

I am moving from Picasa and am finding (as many others) that this is a common corruption. I have many hundreds (thousands?) of files with this corruption

I would love to see this command built into iMatch. Something like Command> Repair Corrupted Metadata

I only used the above exiftool for a specific set of "favourite" files. I will now write a small python script to loop over all the files

Mario

Hi. Welcome to the community.

In my experience, this is more of a rare error. It indicates corrupted data in the file, where a software did not write matching offsets in the IFD or maybe the file has become corrupted by other means.

If you have many of files with this problem, changes are that you have used one of the Picasa versions (or other "home" software) which corrupted metadata in files (in various ways), which is not ideal.

Users often recognize this kind of damage (Picasa is not the only software which damages metadata) after years, when they process their files in other software and the files don't load, are rejected or produce other issues. Like you did now by using IMatch and ExifTool.

I don't think that this error prevents ExifTool from updating the metadata in the file during a write-back. Not sure.
Did you check this?
You can see the actual metadata in your files in the ExifTool Command Processor with the "List Metadata" preset.
If the metadata you have entered or modified in IMatch shows in the file, all is well and no actions are needed.

Maybe run the IMatch Metadata Analyst to check your files for other metadata problems you're unaware of.

What your Perl script does is (I guess) applying a series of commands which recreates EXIF metadata from scratch using ExifTool. Trying to salvage a file with corrupted EXIF data or maker notes. Which ExifTool can do, which is really nice.

I'm not sure about the full consequences of your process, though.

How deals this with existing legacy IPTC or XMP metadata in the file. Or maker notes. Is the data wiped? It not, probably tags which exist both in EXIF and XMP and legacy IPTC are out of sync afterwards (the Metadata Analyst will tell you).
Hard to tell from remote, because this is something that has to be checked for each affected file individually.

Tip: If you need to perform these steps often, you can add a preset file for the IMatch ExifTool Command Processor and then run it from the ECP or via a favorite as needed.


QuoteI would love to see this command built into iMatch. Something like Command> Repair Corrupted Metadata
Such a command does not exist, since what has to be done always depends on the individual damage in a file.
Sometimes less invasive methods like wiping and recreating all EXIF data do suffice, for example.

As I said, I think the error you see does not prevent IMatch from writing metadata and most users will never notice this kind of error, unless they keep the output panel open.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook