Error reading value for IFD0 entry 20

Started by mstorhas, September 13, 2011, 10:27:52 AM

Previous topic - Next topic

mstorhas

Hello Phil,

I'm using the exiftool commandline interface in a windows environment successfully for writing IPTC and EXIF, however, recently I ran into problems with some tif files:
exiftool -o out.tif -IPTC:Headline=someheadline in.tif
Error: Error reading value for IFD0 entry 20 - in.tif
    0 image files updated
    1 files weren't updated due to errors

All files have been processed with PS CS3 or CS4 for MacIntosh. Are there any known issues with those programs? I can open the files without error in Photoshop CS5 and IrfanView. Is there an easy way to circumvent that error?

Thanks in advance, Martin

Phil Harvey

Hi Martin,

I don't know of any PS issue like this.

Can you attach the output of the -htmldump option so I can see what is going on?

ie. exiftool -htmldump in.tif > out.html

Thanks.

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

mstorhas

Hi Phil,

htmldump attached.

Martin

Phil Harvey

#3
Hi Martin,

Thanks for the dump.

This is definitely a bug in the software that wrote the image.  The problem is that the IPTC count is given in bytes even though the data type is long (4 bytes).  With this error, and given the unlucky fact that the IPTC is stored at the end of the file, the stored data size runs past the end of the file.

Rather than risk further corruption, ExifTool will not edit this file because this error makes it look like the IPTC data is truncated.  Any software which rewrites this image without complaining simply isn't doing what I would consider to be basic data integrity checks.

- Phil

More on this: I don't think that PS CS3 wrote this image even though this is reported by the Software tag.  I just tried writing a TIFF with CS4 (which likely uses the same routines as CS3 to write TIFF images), and the file is structured differently, and the IPTC is written correctly and not at the end of the file.
...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 ($).

mstorhas

Hi Phil,

thanks for your detailed analysis. I'll try to find out which software they used.

Martin