Hi,
I get the following error message when ExifTool reads the JPG files from my Nikon D800:
Warning: [minor] Error reading PreviewImage from file - P:/Fotos/Digital/00000000.TEST/DSC20001.JPG
but no error message when reading the D800 NEF files. Is this a problem with the size of the files?
My ExifTool Version is 8.93. Will a newer Version of ExifTool fix this Problem?
Thanks in advance,
Manfred
Hi Manfred,
Your D800 JPEG images have been modified by some software that doesn't preserve the preview image.
I think you will find that images straight out of the camera don't give this warning.
- Phil
Hi Phil,
I tested it with an image straight out of the camera. This one does not give the error.
Then I used GeoTagger to add some info, and now the error came again.
But GeoTagger uses ExifTool and as far as I understand GeoTagger does not modify the file itself.
The size of the JPG file is now even shorter. (A NEF file will not become shorter.)
I will open a Problem Report on GeoSetter.
Regards,
Manfred
Hi Manfred,
GeoTagger and GeoSetter are two different things (but both use Exiftool).
I tried writing some GPS information to a D800 JPEG using ExifTool 9.12 and the PreviewImage wasn't affected. It could be that something else is going on.
- Phil
Hi Phil,
first I will correct a typo: I use GeoSetter (GeoTagger was a typo in my last reply).
After discussing this problem with Heiko from GeoSetter support, I did some more testing on this problem:
1. I installed the most actual versions of GeoSetter (v 3.4.31) and ExifTool (v 9.12)
2. I tested an image straight out of the D800 in GeoSetter with my standard settings: -> error
3. I tested the same (virgin) image with the parameters from GeoSetter directly with ExifTool: -> same error
4. Next I reduced the parameters step by step down to this very short command line, which will reproduce the error directly in ExifTool:
P:\Fotos\Digital\00000000.TEST>exiftool -"EXIF:ModifyDate<now" -execute -"XMP:ModifyDate<now" -common_args -ver 0_DX.JPG
9.12
1 image files updated
9.12
Warning: [minor] Error reading PreviewImage from file - 0_DX.JPG
1 image files updated
P:\Fotos\Digital\00000000.TEST>exiftool -a -G1 -ModifyDate 0_DX.JPG
[IFD0] Modify Date : 2013:01:09 12:29:48
[XMP-xmp] Modify Date : 2013:01:09 12:29:49+01:00
I did some more testing:
no difference between FX size and DX size JPEG files: same error
no error on D800 RAW (NEF) files
no error on Nikon D200 files
I hope you can reproduce this problem with your D800 demo files, otherwise I will send this image by email, or any other info you need.
Best regards,
Manfred
Hi Phil,
another more simple test:
run exiftool -"XMP:ModifyDate<now" -"EXIF:ModifyDate<now" 0_DX.JPG twice, and you get the error on the second run.
Manfred
Hi Manfred,
Thanks for boiling this down to a simple exiftool example. However, I don't get the same thing:
> exiftool -"EXIF:ModifyDate<now" -execute -"XMP:ModifyDate<now" -common_args -ver NikonD800.jpg
9.12
1 image files updated
9.12
1 image files updated
Could you email me the JPG file you are using? (philharvey66 at gmail.com)
Thanks.
- Phil
Hi Manfred,
I got the image, thanks.
It looks like I have a bit of work to do to solve this problem.
The problem is that the same preview image is referenced twice from different locations in the metadata. Once from the maker notes (this one is handled properly by ExifTool), and again from a new MPF segment that exists in your D800 image (firmware 1.01a) but not in the sample I was testing (firmware 0.41).
The good news is that the PreviewImage data is preserved, and it can be accessed normally via the makernotes PreviewImage. The bad news is that it will be a royal pain for me to handle this double-referenced data properly without duplicating the preview when writing (I really hate it when other software does dumb things like double-referencing the same data).
I'll let you know when I have figured this one out.
- Phil
P.S. Read here (https://exiftool.org/standards.html#MPF) if you want to learn more about why the MPF specification sucks.
I have patched this problem and am in the process of preparing ExifTool 9.13 to fix this. I have released the full Perl distribution, and will issue the Windows and Mac versions tomorrow.
I was wrong about the preview being double-referenced. There are, in fact, 2 separate preview images in D800 JPEG images, and the MPF one is getting lost when the metadata is edited by ExifTool. These should both be preserved when writing with ExifTool 9.13.
Thanks for pointing out this problem.
- Phil
Edit: I should also mention that this problem affected images from the D4 and D600 as well as the D800.
Hi Phil,
the new version 9.13 works fine.
Thank you very much for the fix.
Manfred :)
Hi Phil,
as I said before the new version 9.13 works fine, but only for new files.
Is it possible to repair the files which were damaged by earlier versions of ExifTool?
I have about 1500 corrupted files.
Manfred
Hi Manfred,
Is the preview image important to you? It is usual that the preview is not used by anything. This is why it is common for other software to simply delete it when an image is edited.
If it is important, then the only solution is to go to your backups, because unfortunately the large MPF preview no longer exists in these images.
But if you just want to get rid of the ExifTool warnings, the thing to do is to delete the MPF segment (which now contains no useful information). I will add the ability to delete the MPF segment to ExifTool 9.14.
- Phil
Hi Phil,
I just want to get rid of the ExifTool warnings.
So I will wait for 9.14. to delete the MPF segment in my older JPEG files. Do you have already a schedule for the 9.14 Windows release?
Manfred
Hi Manfred,
I hope to release ExifTool 9.14 in 5 days. I have done all of the coding that I plan to include in the release (including the -mpf:all= ability), but it includes some new features that will take some more time to test.
- Phil
Version 9.14 is out now. With this version -mpf:all= will remove the MPF segment from the file. If you do this to files which still contain the MPF preview, you should add -trailer:all= to delete the MPF trailer as well. Deleting this trailer will save nearly a megabyte in D800 JPEG images.
- Phil
Hi Phil,
do you know any application who is using this MPF already or will use it in the future?
The background of my question is: Shall I delete the MPF section on new image to save disk space?
Thanks,
Manfred
Hi Manfred,
These previews may in theory be used by software to speed image loading when displaying a reduced-resolution image, although I couldn't say which applications do this. The main use is in-camera, where the processing power is limited and response time is important.
The MPF preview in question is 1632x1080 pixels. There exists another 570x375 preview in the Nikon maker notes, which could serve this purpose for any application that recognizes it.
Note that the MPF trailer is deleted when the image and/or metadata are edited by the majority of applications out there.
Personally, in the past I have deleted previews like these from my images without any problems when space was an issue. But now that I have a 1 TB disk I'm too lazy to bother. :P
- Phil