ExifTool Forum

ExifTool => Newbies => Topic started by: esancha on January 18, 2013, 01:27:08 PM

Title: Suspicious IFD0 offset for PrintIM
Post by: esancha on January 18, 2013, 01:27:08 PM
Hello!

Go ahead my apologies for my poor English.

Have much photos with a warning: Suspicious IFD0 offset for PrintIM

I've seen here that I need export metadata, delete and import again and it works, but is too much work for so many pictures, is there a way to automate the process?

Thanks in advance
Title: Re: Suspicious IFD0 offset for PrintIM
Post by: Phil Harvey on January 18, 2013, 01:31:37 PM
Do you own a Ricoh Caplio RX by any chance?  This camera really makes a mess of the metadata.  The only solution is to rebuild it from scratch, but this can be done for entire directories with a single command.  See FAQ number 20 (https://exiftool.org/faq.html#Q20) for details.

- Phil
Title: Re: Suspicious IFD0 offset for PrintIM
Post by: esancha on January 18, 2013, 04:35:48 PM
Thanks a lot Phill, I will try your suggestion.

No, I have not a Ricoh, I think the problem comes from some application, likely Exifer, I use it for years to lossless rotate the picture.
Title: Re: Suspicious IFD0 offset for PrintIM
Post by: esancha on January 18, 2013, 05:01:09 PM
Great, it Works, I lose only two tags,
Preview Image (Binary data 369236 bytes, use-b option to extract)
and Warning own

Thanks again
Title: Re: Suspicious IFD0 offset for PrintIM
Post by: Phil Harvey on January 18, 2013, 06:31:20 PM
You're right, the PreviewImage must be written separately.  You may be able to use this command to get the PreviewImage back (assuming you still have the "_original" backup files that ExifTool made):

exiftool -tagsfromfile %d%f.%e_original -previewimage DIR

where DIR is the name of the directory containing the images.

- Phil
Title: Re: Suspicious IFD0 offset for PrintIM
Post by: esancha on January 19, 2013, 07:42:24 AM
Thanks again Phill.

That don't runs  :( (there aren't original files for all the pictures) Perhaps the problem is the same warning that prevents recovery.

Warning: Suspicious IFD0 offset for PrintIM - E:/ExifTool/Fotos/PA023698.JPG_original
Warning: Suspicious IFD0 offset for PrintIM - E:/ExifTool/Fotos/PA023697.JPG_original
Warning: Suspicious IFD0 offset for PrintIM - E:/ExifTool/Fotos/PA023696.JPG_original
Warning: Suspicious IFD0 offset for PrintIM - E:/ExifTool/Fotos/PA023695.JPG_original
Warning: Suspicious IFD0 offset for PrintIM - E:/ExifTool/Fotos/PA023694.JPG_original
    1 directories scanned
    0 image files updated
   13 image files unchanged

Thanks a lot.
Title: Re: Suspicious IFD0 offset for PrintIM
Post by: Phil Harvey on January 19, 2013, 08:23:07 AM
OK, it may be just that the PreviewImage doesn't exist in the original image.

If you want to send me one of the originals I will take a look (philharvey66 at gmail.com).

- Phil
Title: Re: Suspicious IFD0 offset for PrintIM
Post by: esancha on January 19, 2013, 10:15:07 AM
Hi Phill,

I just sent an email with one of the corrupted potos.

Thanks.
Title: Re: Suspicious IFD0 offset for PrintIM
Post by: Phil Harvey on January 19, 2013, 11:46:07 AM
Excellent, thanks for the sample.

The problem is that the preview image pointers are incorrect in the original maker notes (probably corrupted by whatever corrupted the PrintIM pointer).  When extracting the PreviewImage by name, ExifTool uses some extra logic to try to locate a valid preview, which will successfully locate the preview in this file.  Unfortunately though, this logic wasn't being used when copying tags.  This is an oversight on my part, and I will fix this in version 9.15.  So with the next ExifTool update, this command to copy the preview image should work.

But if you don't want to wait for version 9.15, you can do this in two steps with the current version of ExifTool:

1) exiftool -previewimage -b -w .jpg_preview -ext jpg_original DIR

2) exiftool "-previewimage<=%d%f.jpg_preview" DIR

The first command extracts the preview images from the original files and and stores them as "*.jpg_preview" files, and the second command writes these back into the JPEG images.  Here I use the extension ".jpg_preview" (instead of "_preview.jpg") so that ExifTool won't try to process these files too with the second command.

- Phil
Title: Re: Suspicious IFD0 offset for PrintIM
Post by: esancha on January 19, 2013, 12:25:33 PM
Many thanks Phil, I don't know how to thank your help, I'll wait for the new version, I have too much photos with that problem.
Title: Re: Suspicious IFD0 offset for PrintIM
Post by: esancha on January 28, 2013, 01:13:18 PM
Hi Phil,

I downloaded the new version 9.15 and I ran the command you suggested with the following results

C:\Users\emilio>E:\ExifTool\ExifTool.exe -all= -tagsfromfile @ -all:all -unsafe -r C:\Users\emilio\Desktop\1206\
Warning: [minor] Can't delete IFD0 from TIFF - C:/Users/emilio/Desktop/1206/1206 Cantabria/P6240149-P6240152.tif
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Cantabria/P6240149.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Cantabria/P6240150.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Cantabria/P6240151.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Cantabria/P6240152.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Toledo/P6160128.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Toledo/P6160129.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200130.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200131.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200132.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200133.JPG
Warning: [minor] Error reading PreviewImage from file - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200134.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200135.JPG
Warning: [minor] Error reading PreviewImage from file - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200136.JPG
Warning: [minor] Error reading PreviewImage from file - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200137.JPG
Warning: [minor] Error reading PreviewImage from file - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200138.JPG
Warning: [minor] Error reading PreviewImage from file - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200139.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200140.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200141.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200142.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200143.JPG
Warning: [minor] Error reading PreviewImage from file - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200144.JPG
Warning: [minor] Error reading PreviewImage from file - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200145.JPG
Warning: [minor] Error reading PreviewImage from file - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200146.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200147.JPG
Warning: Suspicious IFD0 offset for PrintIM - C:/Users/emilio/Desktop/1206/1206 Toledo/P6200148.JPG
Warning: [minor] Error reading PreviewImage from file - C:/Users/emilio/Desktop/1206/1206 Toledo/tttP6160128.JPG
    3 directories scanned
   28 image files updated

I don't know if the result was foreseeable or not, that way I can know if the problem is solved?

Thank you very much.
Title: Re: Suspicious IFD0 offset for PrintIM
Post by: Phil Harvey on January 28, 2013, 02:21:31 PM
This works for me using the sample original file you sent (I renamed it to "a.jpg"):


> exiftool -ver
9.15
> exiftool a.jpg -previewimage -warning
Preview Image                   : (Binary data 378312 bytes, use -b option to extract)
Warning                         : Suspicious IFD0 offset for PrintIM
> exiftool a.jpg -all= -tagsfromfile @ -all:all -unsafe -r
Warning: Suspicious IFD0 offset for PrintIM - a.jpg
    1 image files updated
> exiftool a.jpg -previewimage -warning
> exiftool a.jpg -tagsfromfile %d%f.%e_original -previewimage
Warning: Suspicious IFD0 offset for PrintIM - a.jpg_original
    1 image files updated
> exiftool a.jpg -previewimage -warning
Preview Image                   : (Binary data 378312 bytes, use -b option to extract)
>


- Phil
Title: Re: Suspicious IFD0 offset for PrintIM
Post by: esancha on January 28, 2013, 04:23:56 PM
Great!

I tried it and it works perfectly.

Thanks a lot.
Title: Re: Suspicious IFD0 offset for PrintIM
Post by: PatX on June 06, 2015, 02:07:50 PM
I know it's along time ago this topic was discussed, buit I've got the same problem now with exiftool version 9.97.
I tried to edit EXIF GPS data of about 3000 holiday pictures with Geotagger (it uses exiftool) and got the error message "Suspicious IFD0 offset for ...". Unfortunately i don't have the *original* files.
I already updated exiftool but wit no success.
Is it possible to repair the jpg files?
Title: Re: Suspicious IFD0 offset for PrintIM
Post by: Phil Harvey on June 06, 2015, 07:47:49 PM
Send me a sample (philharvey66 at gmail.com) and I'll take a look.

- Phil