ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: PascalPradier on October 02, 2014, 04:41:44 PM

Title: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: PascalPradier on October 02, 2014, 04:41:44 PM
hello,
I call Pascal and I lost over 3500 images with the TransfertNX software. The image format is lossless compressed RAW with a Nikon D4 12bits.
I got about 2900 pictures in FX format with your fix_corrupted_nef.pl process and I thank you infinitely. I read that "support for DX Images May Be Added if there is a demand." I made ​​you officialy request to retrieve the 600 remaining.

Thank you for your help and your work.
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: Phil Harvey on October 02, 2014, 08:44:58 PM
Sure.  I can add support for the DX format if you send me a set of 12 test images.  One each corrupted and uncorrupted at each of the compression settings (uncompressed, lossless compressed and compressed) for 12 and 14 bit.  My email is philharvey66 at gmail.com .  I'm away this week, so the turn around at my end won't be quite as quick as usual.

- Phil
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: PascalPradier on October 03, 2014, 02:44:28 AM
Thank Phil

I send you today a set of 12 wrong pictures and another one with goods pictures
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: Phil Harvey on October 03, 2014, 07:50:31 PM
Great.  I'll post back here after I've had a chance to look at them (next week sometime).

- Phil
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: Phil Harvey on October 03, 2014, 08:09:57 PM
I just took a look for them in my mail, but didn't see them.  I don't think they made it through.  Did you mail them directly?  If so, maybe try uploading them and just sending me a link.

- Phil
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: PascalPradier on October 06, 2014, 06:03:37 AM
Hey Phil,

My D4 is now being repaired at Nikon.
I can not you create the 12-bit DX format without transfer error.
I should wait for my D4 is back. I'll see if I can speed up things at Nikon.

I can just send you the pictures in DX format error
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: Phil Harvey on October 06, 2014, 05:53:48 PM
Hi Pascal,

I may be able to figure things out with just the corrupted images, but I can't find them in my mail.  (philharvey66 at gmail.com)  Perhaps try sending them a different way.

- Phil
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: Phil Harvey on October 10, 2014, 12:09:47 PM
I have updated fix_corrupted_nef (https://exiftool.org/fix_corrupted_nef.html) to (hopefully) fix D4 DX images.

- Phil
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: PascalPradier on October 14, 2014, 04:16:54 AM
Thank you Phil, I try now and I will send you my answer about your évolution
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: PascalPradier on October 14, 2014, 04:42:26 AM
I have try but without success. I send you by email my corrupt pictures!
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: PascalPradier on October 14, 2014, 04:58:59 AM
I have try only on my Windows computer this morning from my job. I will try tonight with my Mac from my home.
I have send you a set of 12 pictures at your email adress
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: PascalPradier on October 14, 2014, 05:20:41 AM
error Message is:

Error : This crop size is not yet supported for the D4 - <file adress>
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: Phil Harvey on October 14, 2014, 06:02:20 AM
Hi Pascal,

I got the images this time, thanks.  It looks like my guess was wrong.  I'll come out with a new version of the utility as soon as I can.

- Phil
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: Phil Harvey on October 14, 2014, 12:05:24 PM
Hi Pascal,

I've taken a look at the images.  I still need some uncorrupted D4 DX samples to be able to implement this.  Four images should do it:  two uncompressed (one 12 bit and one 14 bit), and two compressed (one lossless 12 bit, and one lossy 14 bit).

Thanks.

- Phil
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: PascalPradier on October 15, 2014, 07:52:42 AM
I'll try to send one of each pictures uncompress for 12 and 14 bits formats. But for the compress format you will have wait because my camera is in the nikon shop for doing  repaired.
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: PascalPradier on October 16, 2014, 02:31:40 AM
Phil,
you find in your mail box 2 files Nikon D4 14bit Lossless Compressed RAW (DX &FX)
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: Phil Harvey on October 16, 2014, 06:46:26 AM
Thanks.  Now I only need 3 more uncorrupted samples to add support for D4 DX images:

1) 12 bit lossy compressed
2) 12 bit uncompressed
3) 14 bit compressed

- Phil
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: Hayo Baan on October 18, 2014, 06:00:08 AM
Hi Phil,

I just sent you 12 and 14 bit DX sample files taken with my D4. Hope this helps you solve Pascal's (and other's) corrupted files.

Cheers,
Hayo
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: Phil Harvey on October 18, 2014, 07:57:57 AM
Thanks Hayo!

Well, darn.  I did guess correctly the first time. :(

The NEF images Hayo sent match my guess at what the DX parameters should be.  The most telling one is:

Crop Hi Speed: On (4992x3292 cropped to 3264x2140 at pixel 840,576)

However, the files that Pascal is having troubles with are not this size.  They are:

Crop Hi Speed: On (4992x3292 cropped to 4160x2732 at pixel 392,280)

I don't have D4 manual handy, so I can't tell what mode this is (apparently not DX format), but I need the samples at this crop size to be able to add support for fixing Pascal's images.

- Phil
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: Hayo Baan on October 18, 2014, 11:11:03 AM
Hi Phil, ah, those were shot at the 1.2x crop setting. I just sent you those too. For completeness I have sent you 5:4 images as well.
(hope you have a big inbox ;))

Cheers,
Hayo
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: Phil Harvey on October 18, 2014, 01:44:06 PM
Hi Hayo,

Excellent, thanks!  I'll take a look at these as soon as I can, and add support for all of these crop sizes.

My inbox is huge, thanks. ;)  But your zipped images are well compressed, so their size is no problem at all.

- Phil
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: Phil Harvey on October 19, 2014, 12:51:34 PM
Thanks to Hayo, I have the samples I needed to add support for D4 1.2x and 5:4 cropped images.  I've just released fix_corrupted_nef version 2.3, which should now support these crop sizes.

Note that some of the test files Pascal sent were transferred with a newer version of Nikon Transfer, and didn't seem corrupted.  Unfortunately, the fix_corrupted_nef utility incorrectly identifies these as corrupted NEF images (since the IFD structure has been re-arranged so that it no longer looks like an out-of-camera NEF).  So it will try to fix them, actually corrupting them in the process.  However, you always need to check your "fixed" images anyway, to be sure you selected the correct bit depth.  So if you find that the "fixed" images are corrupted for both bit depths, then the original may be one of these non-corrupted-but-NikonTransfer-modified images.

- Phil

Edit:  Just FYI:  I need the uncorrupted samples to get the uncompressed image lengths in bytes, and the StripByteCounts and RowsPerStrip for each of the different compression types.  This information is lost by the Nikon software corruption, and is needed to rebuild the raw image IFD (SubIFD1).  My earlier guess for these parameters for D4 DX images was that they were the same as for the Df (which turned out to be correct).  Since these two models are so similar, I have used Hayo's D4 1.2x and 5:4 samples to also add support for these Df crop sizes. (Before this update, the Df supported DX crop, but not 1.2x or 5:4.)  I use the corrupted samples to verify that the fix is working properly.
Title: Re: fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand
Post by: PascalPradier on November 04, 2014, 05:12:24 AM
Thankyou Phil for your job, I tried your new version where you have fixed the bug for 12 bits compress with DX format and it's the very best success.  ;D
I send you my contribution by paypal. Thank you very much for all