Error reading preview image

Started by Ricard, November 26, 2015, 06:00:26 AM

Previous topic - Next topic

Ricard

Hello Phil,

I discovered Exif tool a few days ago and, first of all, I want to tell you that it seems by far the best way to remove the Exif data I've tested in the whole week, so big thank you for your effort.
Just one question: When I clean selectively some exif data of the Sony RX-100 of my work partners it works perfectly and the console command confirms that the cleaning process has executed fine. But when I try to do the same process with a picture done in a Sony A7M2, it appears a warning message telling the follow "error reading previewimage- *.jpeg".

I guess that this message may appear because the Sony A7M2 (firmware 2.00) is relatively new and it may be some incompatibility between the previews that this new model generate and Exif tool. I just wondering if that might be a problem.

More info:

- Windows 10 Pro
- ExifTool 10.05
- I attatched a cmd output image

Thank you so much in advance.

Kind regards,

Ric

Phil Harvey

Hi Ric,

ExifTool works fine with A7M2 images (firmware version 1.00 at least).  The problem is that some other software has either removed the preview or changed the metadata somehow to make the preview inaccessible.  If you find otherwise with a sample directly from the camera, please send it to me so I can take a look (philharvey66 at gmail.com).

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

Ricard

Thanks for your fast response Phil,

Following your advice I've tried with old pictures done with 1.21 firmware (is the oldest I have) and the message "error reading previewimage- *.jpeg" is still there.
Just in case you want to try, I've sent you a sample image to the email you provide.

Thanks again for your time,

Ric

Phil Harvey

Hi Ric,

I got the image, thanks.  ExifTool reads the preview fine from this image, and gives no errors for a simple command to write some metadata.

> exiftool -artist=me a.jpg
    1 image files updated


Can you show me a command which generates the error?

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

Ricard

Hi Phil,

After doing some tests, I've finally find out where the problem is.

You were right, Exif Tool works perfectly fine with the new firmware 1.21, 2.00, etc... But I find out that the error message appears when I try to remove some metadata in a selective way using "- tagsfromfile @" (instead of using the procedure you've used on "artist").
So, the command which causes the error is "- tagsfromfile @", and I was wondering if there is any way to remove some particular tags selectively without using this command.

Thanks in advance,

Ric

Phil Harvey

Hi Ric,

Ah, I see.  I get this:

> exiftool a.jpg -previewimage -warning -a
Preview Image                   : (Binary data 410149 bytes, use -b option to extract)
Warning                         : [minor] Error reading PreviewImage
> exiftool a.jpg -tagsfromfile @
Warning: [minor] Error reading PreviewImage - a.jpg
    1 image files updated
> exiftool a.jpg -previewimage -warning -a
Preview Image                   : (Binary data 410149 bytes, use -b option to extract)
> exiftool a.jpg -tagsfromfile @
    1 image files updated


The problem is that there are two different preview images referenced in the file, one in the MakerNotes and one in the MPF section.  ExifTool complains about the MakerNotes preview because the length is 0, however the MPF preview is fine and should be handled properly.

After rewriting the image, ExifTool stores a placeholder for the missing preview, so the warning doesn't happen the second time.

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

Ricard

Ok! Thank you so much for your accurate explanation Phil.
Taking this into account I'm not going to care about these messages.

Thanks for your time and great support.

Best regards,

Ric