photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: peterpix on September 10, 2023, 04:43:01 PM

Title: Error reading StripOffsets data in IFD1
Post by: peterpix on September 10, 2023, 04:43:01 PM
I am getting this error message (when hovering over the yellow warning triangle on an image thumbnail) when I try to write metadata to certain images. I am also getting an error message to say that the metadata has not been written, and the yellow write metadata pencil is still there, yet the metadata (keywords and hierarchical keywords) appears (from the metadata panel) to have been written. This appears to be happening with (some but not all) images (tiff and jpeg) exported from Radiant Photo. I would love to know what this error message means.

Peter

Edit: IMatch version is latest, running on Windows 11.
Title: Re: Error reading StripOffsets data in IFD1
Post by: Mario on September 10, 2023, 05:17:49 PM
This message comes from ExifTool, which apparently encountered a problem in your files.
In most cases, this indicates that the files contain bad metadata or some other issue that prevents ExifTool from writing, unless ExifTool considers it safe anyway. But ExifTool returns an error in your case, and IMatch displays that error in the UI so you know that there is a problem.

Tip: If you report such things, always include the IMatch log file from that session (see log file (https://www.photools.com/help/imatch/#im_logfile.htm)) and provide a sample image that causes this behavior. This gives us a minimum of information to work with.

I have never used Radiant Photo or analyzed the TIFF and JPEG variants they produce. Or if and which metadata they write.

Use the IMatch Metadata Analyst (https://www.photools.com/help/imatch/app-md-analyst.htm?dl=hid-1) to learn more about the state of these files and problems ExifTool finds in them.

Re-save a TIFF file with this problem in a known-good application like Photoshop or Affinity Photo or your favorite image editor to fix potential problems caused by the other software. Then try to write the files again in IMatch.

You can send two sample files to support email address (https://www.photools.com/support/) (with a link back to this topic) (JPG, TIFF straight from the other software) and I will re-save it in Photoshop and Affinity Photo to see if this fixes the problem. If it does, I suspect that the other software has an issue that is detected and reported by ExifTool.

If you do a quick goggle for Error reading StripOffsets data in IFD you'll find a couple of potential reasons for this error message.
Title: Re: Error reading StripOffsets data in IFD1
Post by: peterpix on September 10, 2023, 07:04:54 PM
Thanks Mario

There are hundreds of files so it is difficult to resave all of them.

I ran Metadata Analyst and got this long list of errors:


Also:

[ExifIFD]:UserComment not mapped to [XMP-dc]:Description (embedded).

But I don't know what any of that means.

I've emailed Radiant Photo with a sample image. I will send some sample images to you also.

Best

Peter
Title: Re: Error reading StripOffsets data in IFD1
Post by: Mario on September 10, 2023, 08:14:54 PM
QuoteIFD0:StripOffsets is past end of file

This is the main problem. A "strip offset" is a pointer that points at a specific byte address inside an image file.
Applications use these pointers to find stuff in the file and to read data.
Your image contains pointers that point "outside" the file (at addresses larger than the file) which makes them invalid.
ExifTool detected this and considers the file as damaged. Hence the error message.

There are also some other issues which indicate that the EXIF data produced by the other software does not follow the EXIF standard.

Quote[ExifIFD]:UserComment not mapped to [XMP-dc]:Description (embedded).

This means that the other software has written an EXIF user comment, but did not mirror the comment into the XMP-dc:Description tag as required by the MWG and industry practice.

IMatch/ExifTool usually take care for this by properly mapping between XMP and EXIF / GPS / IPTC during write-back, ensuring that the data that exists in multiple metadata formats is properly synchronized.
Since write back is not successful for the files, this cannot happen.

Many software products out there don't do care for proper mapping between different metadata formats that co-exist in the same image - causing different values to exist e.g. in EXIF and XMP.
(Which is more or less harmless for things like UserComment, but can become problematic if EXIF and XMP have different values for the same time stamps).

Probably Radiant Photo does not prioritize proper metadata handling very high. Ahem...
Only they can fix this.

This is another example for what I describe as metadata mess.
Applications, even from bigger vendors, not putting in the work and giving a sh*t for proper metadata handling and standard compliance.

This usually boils up in IMatch since IMatch cares for metadata and goes the extra mile to produce rich, complete and standard-compliant metadata in your files. And to detect issues with metadata in your files and inform you about problems detected.

Or it boils up when you try to open your files in other image editors or on other platforms.
Suddenly, some files are not readable, in the "wrong format", metadata is not found or the images look "funny".
Title: Re: Error reading StripOffsets data in IFD1
Post by: peterpix on September 11, 2023, 05:33:57 AM
Mario thanks, that is very helpful indeed. As always iMatch achieves the highest of standards, and your support is second to none. A wonderful app. I'm very glad I switched to it several years ago.
Title: Re: Error reading StripOffsets data in IFD1
Post by: Mario on September 11, 2023, 09:55:23 AM
I did looked at the files you've sent.
I cannot add much to the analysis of the Metadata Analyst. ExifTool writes XMP metadata but refuses to update EXIF data because of the invalid offsets.

Re-saving the files in Photoshop did not change anything since Photoshop does not touch these areas.

Re-saving in a "dumb" image editor stripped the existing EXIF / IFD data and that fixed the problem (but also lost existing metadata).

Running the ExifTool Command Processor with these arguments to remove the broken IFD0 record also fixed the problem, without losing XMP or EXIF data:

# im-warn
-overwrite_original_in_place
-ifd0:all=
-charset
filename=UTF8
{Files}

The next write-back is successful and ExifTool recreates the IDF0 data block correctly.
Title: Re: Error reading StripOffsets data in IFD1
Post by: joe on October 05, 2023, 02:42:36 AM
Just sharing for others that encounter this issue and are looking for solutions. I had the exact subject IFD1 error in a couple files as well. I couldn't patch any of the Metadata Analyst-identified errors due to this corruption. However, I tried the solution mentioned here in the ExifTool forum (https://exiftool.org/faq.html#Q20). It worked well and even kept my tags.