NEF To DNG Conversion
A good long while back I did a comparison of RAW and JPEG as image formats. The conclusion then was that RAW has suddenly become useful for some cases - when one needs to capture a high-dynamic range scene and can do so by exposing for highlights, can shoot at base ISO, and can't or won't bracket
. To that I can add that RAW is very useful for astrophotography, and when the white balance is difficult or you expect to require different white balance settings for different parts of the image.
I still stand by my estimate back then that this is quite a rare event
. But the Raw vs. Jpeg comparison was done over three years ago - and rare as the event may be, over three years you do accumulate a couple of RAW files. About 2,000 to be exact. (Compare that to about 40,000 JPEGs.) Challengers like Google's WebP[a] and now BPG[b] notwithstanding[1], I expect JPEG to be "good enough" for a good many years more, and readable for a great many years beyond that.
The same thing can't be said for Nikon's raw NEF files. Being Nikon's proprietary file format, they contain stuff only Nikon knows how to interpret and should Nikon go belly up... ...well, hope you interpreted what you needed to interpret by then. So I started looking into converting my NEF files into Adobe's Digital Negative format - DNG.
1. DNG
DNG is sort of an "open raw format". It is supposed to be a superset of all RAW formats, being able to store everything that every RAW format contains in a standard way. The American Society of Media Photographers[d] recommends using DNG for archiving, and the Library of Congress lists DNG as a preferred alternative to RAW[e].
2. Tests
I'm generally suspicious of "supreme data formats". Since they rarely are ahead of the curve when defining data items, they tend to have almost but not perfect ability to absorb all the data of other formats: 99% gets converted OK, but the last 1% is lost. So I set out to see just what DNG would drop on the floor. As a sample, I used a RAW photo of my toy camel.
I started with the out-of-camera NEF.
Then I wrote GPS data to the NEF and to an XMP sidecar file.
I wrote a description and a Microsoft face tag to the XMP sidecar file.
I used Adobe's DNG Converter[f] to convert the NEF+XMP to:
DNG
DNG with embedded original file
I extracted the NEF from the DNG with embedded original file.
3. Summary of Results
The image data was handled without any issues. The DNG, when opened in Adobe Camera Raw, yielded exactly the same image data as the original NEF.
The "embed original image data" option also does exactly what it says on the box. The original NEF could be extracted with no changes whatsoever. The sidecar XMP could not be extracted, however.
The metadata was shuffled around a bit. The XMP data was merged with the NEF data and put into the DNG file, with the NEF data having priority in case of data being defined in both. The DNG converter then added some fields of its own. Both the description and the face tags were converted perfectly, something I verified by having exiftool
extract XMP from the DNG.
For the raw data, see the diff viewer below.
4. Conclusion
Well, gee, I dunno... Having the file format endorsed by the Library of Congress is a good thing, I suppose - but then they also recommend JPEG2000, which makes me a bit nervous as that is one of those "state of the art better than JPEG" formats that failed to go anywhere. Most likely, I'll go for DNG with embedded NEF. If something goes wrong, and I find out that I should have used a different converter, or a different setting, or something else, I'll at least be able to get my NEFs back. Yes, my DNGs will be twice as lovely, but then again I don't shoot much RAW so in the grand scheme of things it won't make that much of a difference.
5. Diff Viewer
|
Key | ||
---|---|---|
Active Area | 0 0 4012 6034 | |
Analog Balance | 1 1 1 | |
Anti Alias Strength | 1 | |
Aperture Value | 2.0 | |
Approximate Focus Distance | 0.35 | |
As Shot Neutral | 0.761905 1 0.442907 | |
Baseline Exposure | 0.35 | |
Baseline Noise | 1 | |
Baseline Sharpness | 1 | |
Bayer Green Split | 250 | |
Best Quality Scale | 1 | |
Bits Per Sample | 12; 8 8 8 | 16; 8 8 8 |
Black Level | 0 | |
Black Level Repeat Dim | 1 1 | |
CFA Layout | Rectangular | |
CFA Plane Color | Red,Green,Blue | |
Calibration Illuminant 1 | Standard Light A | |
Calibration Illuminant 2 | D65 | |
Camera Calibration 1 | 1 0 0 0 1 0 0 0 1 | |
Camera Calibration 2 | 1 0 0 0 1 0 0 0 1 | |
Camera Calibration Sig | com.adobe | |
Camera Serial Number | 6097333 | |
Color Matrix 1 | 0.7179 -0.1985 0.0103 -0.4102 1.0944 0.3649 -0.0609 0.1585 0.8185 | |
Color Matrix 2 | 0.7013 -0.1408 -0.0635 -0.5268 1.2902 0.264 -0.147 0.2801 0.7379 | |
Compression | JPEG (old-style); Nikon NEF Compressed; Uncompressed | JPEG; JPEG (old-style); Uncompressed |
Create Date | 2014:12:16 17:46:00; 2014:12:16 17:46:00.20 | 2014:12:16 17:46:00; 2014:12:16 17:46:00+01:00 |
Creator Tool | Adobe DNG Converter 8.7 (Windows) | |
DNG Backward Version | 1.1.0.0 | |
DNG Lens Info | 35mm f/1.8 | |
DNG Version | 1.4.0.0 | |
Date Created | 2014:12:16 17:46:00+01:00 | |
Date/Time Digitized | 2014:12:16 17:46:00+01:00 | |
Date/Time Original | 2014:12:16 17:46:00; 2014:12:16 17:46:00+01:00; 2014:12:16 17:46:00.20 | 2014:12:16 17:46:00 |
Default Crop Origin | 8 6 | |
Default Crop Size | 6016 4000 | |
Default Scale | 1 1 | |
Derived From Document ID | E48EF6D7BBD746D525ABE31084E70BFB | |
Derived From Original Document ID | E48EF6D7BBD746D525ABE31084E70BFB | |
Directory | original | dng |
Document ID | xmp.did:c4829856-b61c-6549-b4f4-7647f447f5c1 | |
Exif Byte Order | Big-endian (Motorola, MM) | Little-endian (Intel, II) |
Exif Version | 0230 | |
File Access Date/Time | 2014:12:17 21:04:41+01:00 | 2014:12:17 22:01:45+01:00 |
File Creation Date/Time | 2014:12:17 21:04:41+01:00 | 2014:12:17 22:01:45+01:00 |
File Modification Date/Time | 2014:12:16 18:28:46+01:00; 2014:12:17 22:18:03+01:00 | 2014:12:17 22:01:45+01:00 |
File Name | 201412161746-DSC_4789.nef; 201412161746-DSC_4789.xmp | 201412161746-DSC_4789.dng |
File Size | 1510 bytes; 18 MB | 13 MB |
File Type | NEF; XMP | DNG |
Focal Plane Resolution Unit | cm | |
Focal Plane X Resolution | 2595.252136 | |
Focal Plane Y Resolution | 2595.252136 | |
Format | image/dng | |
Forward Matrix 1 | 0.7755 0.0884 0.1003 0.2732 0.8748 -0.148 0.0234 -0.4317 1.2333 | |
Forward Matrix 2 | 0.7477 0.2145 0.002 0.3005 0.9721 -0.2726 0.0232 -0.2404 1.0423 | |
GPS Longitude | 17 deg 3' 47.88" E; 18 deg 3' 47.88"; 18 deg 3' 47.88" E | 18 deg 3' 47.88"; 18 deg 3' 47.88" E |
GPS Position | 59 deg 19' 48.78" N, 17 deg 3' 47.88" E; 59 deg 19' 48.78" N, 18 deg 3' 47.88" E | 59 deg 19' 48.78" N, 18 deg 3' 47.88" E |
History Action | derived, saved | |
History Changed | / | |
History Instance ID | xmp.iid:c4829856-b61c-6549-b4f4-7647f447f5c1 | |
History Parameters | converted from image/x-nikon-nef to image/dng, saved to new location | |
History Software Agent | Adobe DNG Converter 8.7 (Windows) | |
History When | 2014:12:17 22:01:45+01:00 | |
Image Description | Description of image in XMP | |
Image Height | 120; 4012 | 170; 4012; 681 |
Image Number | 49441 | |
Image Size | 6080x4012 | 6034x4012 |
Image Width | 160; 6080 | 1024; 256; 6034 |
Instance ID | xmp.iid:c4829856-b61c-6549-b4f4-7647f447f5c1 | |
Jpg From Raw | (Binary data 992771 bytes, use -b option to extract) | |
Jpg From Raw Length | 992771 | |
Jpg From Raw Start | 3900 | |
Lens | 35mm f/1.8; 35mm f/1.8 G | 35.0 mm f/1.8; 35mm f/1.8; 35mm f/1.8 G |
Lens ID | AF-S DX Nikkor 35mm f/1.8G | 159; AF-S DX Nikkor 35mm f/1.8G |
Lens Info | 35mm f/1.8 | |
Lens Model | 35.0 mm f/1.8 | |
Linear Response Limit | 1 | |
Linearization Table | (Binary data 3368 bytes, use -b option to extract) | |
MIME Type | application/rdf+xml; image/x-nikon-nef | image/x-adobe-dng |
Metadata Date | 2014:12:17 22:01:45+01:00 | |
Modify Date | 2014:12:16 17:46:00; 2014:12:16 17:46:00+01:00; 2014:12:16 17:46:00.20 | 2014:12:17 22:01:45; 2014:12:17 22:01:45+01:00 |
New Raw Image Digest | 55f718ca970b93121f35cbdefe363128 | |
Noise Profile | 3.91012436102846e-005 7.43124960486706e-008 3.75753414206149e-005 6.40769485919105e-008 3.84237430380713e-005 6.43796376659275e-008 | |
Original Document ID | E48EF6D7BBD746D525ABE31084E70BFB | |
Original Raw File Name | 201412161746-DSC_4789.NEF | |
Other Image | (Binary data 782826 bytes, use -b option to extract) | |
Other Image Length | 782826 | |
Other Image Start | 997016 | |
Photometric Interpretation | Color Filter Array; RGB | Color Filter Array; RGB; YCbCr |
Preview Application Name | Adobe DNG Converter | |
Preview Application Version | 8.7 | |
Preview Color Space | 2 | |
Preview Date Time | 2014:12:17 22:01:44+01:00 | |
Preview Image | (Binary data 115619 bytes, use -b option to extract) | (Binary data 115619 bytes, use -b option to extract); (Binary data 29764 bytes, use -b option to extract) |
Preview Image Length | 115619 | 115619; 29764 |
Preview Image Start | 1802312 | 29926; 402856 |
Preview Settings Digest | a3d70aa1b6a6c4813bc5de69ad6fc4ef | |
Profile Calibration Sig | com.adobe | |
Profile Copyright | Copyright 2012 Adobe Systems, Inc. | |
Profile Embed Policy | Allow Copying | |
Profile Hue Sat Map Data 1 | (Binary data 137936 bytes, use -b option to extract) | |
Profile Hue Sat Map Data 2 | (Binary data 138217 bytes, use -b option to extract) | |
Profile Hue Sat Map Dims | 90 30 1 | |
Profile Look Table Data | (Binary data 89143 bytes, use -b option to extract) | |
Profile Look Table Dims | 36 8 16 | |
Profile Name | Adobe Standard | |
Raw Data Unique ID | 5CB58B75E05DB5B1788E564B00000000 | |
Reference Black White | 0 255 0 255 0 255 | 0 255 128 255 128 255 |
Rows Per Strip | 120; 4012 | 170; 681 |
Shadow Scale | 1 | |
Shutter Speed Value | 0.4 | |
Software | Ver.1.00 | Adobe DNG Converter 8.7 (Windows) |
Strip Byte Counts | 16525920; 57600 | 130560 |
Strip Offsets | 18444106; 1918186 | 272296 |
Sub Sec Time | 20 | |
Sub Sec Time Digitized | 20 | |
Sub Sec Time Original | 20 | |
TIFF-EP Standard ID | 1 0 0 0 | |
Tile Byte Counts | (Binary data 2303 bytes, use -b option to extract) | |
Tile Length | 256 | |
Tile Offsets | (Binary data 3161 bytes, use -b option to extract) | |
Tile Width | 256 | |
Unique Camera Model | Nikon D3200 | |
User Comment | ||
White Level | 3880 | |
XMP Toolkit | Image::ExifTool 9.78 | Adobe XMP Core 5.6-c011 79.156380, 2014/05/21-23:38:37 |
Y Cb Cr Coefficients | 0.299 0.587 0.114 | |
Y Cb Cr Sub Sampling | YCbCr4:2:0 (2 2) |
Footnotes
[1] | Even the JPEG 2000[c] format didn't manage to dethrone its predecessor. |
Links
https://developers.google.com/speed/webp/?csw=1 | |
http://bellard.org/bpg/ | |
http://www.jpeg.org/jpeg2000/ | |
http://www.dpbestflow.org/DNG | |
http://www.digitalpreservation.gov/formats/content/still_preferences.shtml | |
http://www.adobe.com/support/downloads/product.jsp?product=106&platform=Windows | |
http://www.sno.phy.queensu.ca/~phil/exiftool/ |