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
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
Hi Phil,
htmldump attached.
Martin
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.
Hi Phil,
thanks for your detailed analysis. I'll try to find out which software they used.
Martin