fix_corrupted_nef.pl : support for DX Images May Be Added if there is a demand

Started by PascalPradier, October 02, 2014, 04:41:44 PM

Previous topic - Next topic

PascalPradier

Phil,
you find in your mail box 2 files Nikon D4 14bit Lossless Compressed RAW (DX &FX)

Phil Harvey

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

Hayo Baan

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
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

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

Hayo Baan

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
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

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

Phil Harvey

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

PascalPradier

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