Convert.exe file.NEF file.jpg destroys ALL EXIF data

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
BrianP007
Posts: 49
Joined: 2013-12-13T09:54:14-07:00
Authentication code: 6789

Convert.exe file.NEF file.jpg destroys ALL EXIF data

Post by BrianP007 »

Hi,
This was fixed in IM ver 6.5 but is baaaaaaaack
Conversion from .CR2 or .NEF to .JPG completely removes EXIF
magick wrote:This problem was reported previously. We have a patch in ImageMagick 6.5.4-10, the latest release.
All of the original NEF EXIF is gone. What's left is OS level junk and maybe some identify trivia. The ShutterCount and the SubSecCreateDate, the 2 most important items, are disappeared.

Test case:
exiftool -all p:/br2/pf-2014.0418/nef/pf-2014.0418-216999.nef | wc
222 1180 9953 << Megatons of good junk!
P:\br2\pf-2014.0418>rm p:/br2/pf-2014.0418/nef/pf-2014.0418-216999.n.jpg
P:\br2\pf-2014.0418>rm p:/br2/pf-2014.0418/nef/pf-2014.0418-216999.n.jpg
rm: p:/br2/pf-2014.0418/nef/pf-2014.0418-216999.n.jpg: No such file or directory
P:\br2\pf-2014.0418> convert p:/br2/pf-2014.0418/nef/pf-2014.0418-216999.nef p:/br2/pf-2014.0418/nef/pf-2014.0418-216999.n.jpg

P:\br2\pf-2014.0418> identify p:/br2/pf-2014.0418/nef/pf-2014.0418-216999.n.jpg
p:/br2/pf-2014.0418/nef/pf-2014.0418-216999.n.jpg JPEG 4924x7378 4924x7378+0+0 8-bit sRGB 7.449MB 0.000u 0:00.000

P:\br2\pf-2014.0418> exiftool -ver -all p:/br2/pf-2014.0418/nef/pf-2014.0418-216999.n.jpg
9.82
ExifTool Version Number : 9.82
File Name : pf-2014.0418-216999.n.jpg
Directory : p:/br2/pf-2014.0418/nef
File Size : 7.1 MB
File Modification Date/Time : 2015:01:23 14:18:54-06:00
File Access Date/Time : 2015:01:23 14:09:03-06:00
File Creation Date/Time : 2015:01:23 14:09:03-06:00
File Permissions : rw-rw-rw-
File Type : JPEG
MIME Type : image/jpeg
JFIF Version : 1.01
Resolution Unit : inches
X Resolution : 1
Y Resolution : 1
Image Width : 4924
Image Height : 7378
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Image Size : 4924x7378
Megapixels : 36.3

P:\br2\pf-2014.0418>convert -version
Version: ImageMagick 6.8.9-2 Q16 x64 2014-05-27 http://www.imagemagick.org

I can't [easily, safely] even try the new 6.9 version of IM convert. The windoz installer expects an old ActiveSTate Perl and I have a much newer (and cooler) Strawberry version. And, the binary zip files are MIA, links broken:
ImageMagick-6.9.0-4-Q16-x86-windows.zip download download Portable Win32 static at 16 bits-per-... << NFG

http://www.imagemagick.org/download/bin ... indows.zip
The requested URL /download/binaries/ImageMagick-6.9.0-4-Q16-x86-windows.zip was not found on this server.

This 2009 issue has probably not been addressed in this last, 6.9 release since the 6.8.9 I am using.

The HDRSoft gang has a bug in their Photomatix program. 5-10% of the time, it picks the correct name from the 7 (or so) files to merge, the first in sorted order, but grabs the exif data from some random, middle image, scrambling the EXIF data from 2 NEFs

II2SC: ERROR! FSC 216996 != SC 216999 for fn pano/p13/pf-2014.0418-216996.jpg Error = +3
II2SC: ERROR! FSC 217010 != SC 217013 for fn pano/p13/pf-2014.0418-217010.jpg +3
II2SC: ERROR! FSC 217018 != SC 217020 for fn pano/p13/pf-2014.0418-217018.jpg +2
II2SC: ERROR! FSC 217025 != SC 217027 for fn pano/p13/pf-2014.0418-217025.jpg +2
II2SC: ERROR! FSC 217046 != SC 217048 for fn pano/p13/pf-2014.0418-217046.jpg +2
II2SC: ERROR! FSC 217053 != SC 217054 for fn pano/p13/pf-2014.0418-217053.jpg +1
II2SC: ERROR! FSC 216882 != SC 216885 for fn pano/p8/pf-2014.0418-216882.jpg +3
II2SC: ERROR! FSC 217069 != SC 217072 for fn rest/pf-2014.0418-217069.jpg +3
II2SC: ERROR! FSC 217095 != SC 217098 for fn rest/pf-2014.0418-217095.jpg +3

Here is a bit of IM MAGICK which promptly transplants the correct bitmap on the right EXIF data:

Code: Select all

         ($first, $phcked, $fixed = @_);
	$im1 = Image::Magick->new();
	$im1->Read($first, $phcked);
	print("FWC: First='$first', AFU='$phcked', Fixed='$fixed'\n");
	$p = $im1->Layers(method=>'Merge');
	$p->Write("jpg:$fixed");
But, when I try to use a NEF as the $FIRST, the exif source, I get only superficial trivia.
Post Reply