NEF or DNG?

That's interesting stuff. Not sure if I would want to trust my pictures to some emulator, but definitely interesting stuff.
Then it's lucky we have people like David Coffin. His open source
dcraw program decodes the raw file formats for about 300 cameras,
including many that are so obscure Adobe didn't build support for
them into the DNG converter.

http://cybercom.net/~dcoffin/dcraw/
http://en.wikipedia.org/wiki/Dcraw
I thought about mentioning this, but I expect most people would not be interested in depending on a piece of C programming for the long-term accessibility of their photos.

Yes, I am aware of dcraw and I actually keep copies of it around for my own use. As a programmer myself, I have looked at the code and made sure I felt confident I would be able to use it 30 years from now if the NEF file format would otherwise have become obsolete.
So yes, right now, we have a path to support all cameras, past,
present, and future, no matter how obscure, on computers ranging
from near unusable antiques to today's best, right out into the
future.
For me personally, I fully agree with you. Which is why I haven't bothered with the DNG format myself. But I think I may be more technically inclined than many others. For many people, a single "standard" format for RAW files would be a good idea.

I have my doubts if DNG is that single standard; I'm not convinced by it at all. Looks like they are trying to be everything to everyone. I think a real standard archival format should be much simpler, storing the binary pixel data in a clearly defined fashion (no fancy compression) plus possibly additional tags in some XML data. Something people can figure out in a couple of hundred years by just looking at the data, without the need of extensive manuals.

But that's maybe just me.

Eric
--
http://www.lumenssolutions.com/photography/
 
Most raw converters only support a DNG if they already support the
raw file that the DNG was converted from. DNG is just a wrapper,
the raw processing program needs to know how to handle the data
inside that wrapper.
A few products have deficient implementations of DNG that makes them work like that. These include Aperture, ACDSee, and Rawshooter(s).

I know of more products that don't have such a deficient implementation, so it CAN be done better:
http://www.barrypearson.co.uk/articles/dng/dng_not_native.htm#examples
I think you're wrong about that! The whole idea behind DNG is that
you don't have those manufacturer specific RAW processing
procedures anymore. When software supports DNG it should be able to
read all DNG's, no matter what the original RAW file format was.
[snip]

Correct. The operative word is "should". They have to get their implementation right. Here are descriptions of the basic principle:
http://www.barrypearson.co.uk/articles/dng/profiles.htm
http://www.barrypearson.co.uk/articles/dng/innovation.htm
http://www.barrypearson.co.uk/articles/dng/dng_not_native.htm
 
egrivel wrote:
[snip]
That's interesting stuff. Not sure if I would want to trust my
pictures to some emulator, but definitely interesting stuff.
An important question is whether in future people will be able to access their old images with their future workflow and tools of choice. Ideally, surely that is what we want? That shouldn't involve emulators, etc.

[snip]
Yes, I am aware of dcraw and I actually keep copies of it around
for my own use. As a programmer myself, I have looked at the code
and made sure I felt confident I would be able to use it 30 years
from now if the NEF file format would otherwise have become
obsolete.
Good idea. It also processes DNG, of course - including DNGs for cameras not yet released.

[snip]
I have my doubts if DNG is that single standard; I'm not convinced
by it at all. Looks like they are trying to be everything to
everyone. I think a real standard archival format should be much
simpler, storing the binary pixel data in a clearly defined fashion
(no fancy compression) plus possibly additional tags in some XML
data. Something people can figure out in a couple of hundred years
by just looking at the data, without the need of extensive manuals.
That is a bit optimistic, but DNG does store the binary pixel data, and optionally without compression. (Although the optional compression is JPEG lossless compression, which is documented, even if not widely used).

Most of the additional tags are held in a TIFF 6.0 tag-structure. If we lose knowledge of TIFF in future, then, yes, we will lose knowledge of DNG, and LOTS more besides. (NEFs also use a structure based on TIFF 6.0).

A problem isn't just what the data looks like. It also what relationship do those sensor values have to the original scene - what tones and colours in the original scene give particular values? And there is more camera-knowledge needed too. What DNG does is add information about this to the file, so that products can read out camera details as well as the raw image data.
http://www.barrypearson.co.uk/articles/dng/profiles.htm
http://www.barrypearson.co.uk/articles/dng/innovation.htm
http://www.barrypearson.co.uk/articles/dng/dng_not_native.htm
 
Stringray wrote:
[snip]
People generally don't convert to DNG for the purpose of saving
space. The main reason is that most RAW formats, including NEF, are
proprietary. The file format of those RAW files are often unique
for each type and brand. There's no guarantee that you can open
your precious RAW files in the future with newer software.
[snip]

Correct. There are various benefits to DNG, of which space is not the most important to many people:
http://www.barrypearson.co.uk/articles/dng/benefits.htm
 
Joseph S. Wisniewski wrote:
[snip]
Not at all. It's a lot more than a bit of metadata. It's a question
of fundamental algorithms.
[snip]
Camera after camera, it's not just data, but special algorithms
required to deal with it.
I've snip that valuable insight into some of the problems of raw conversion.

In summary, raw conversion needs lots of algorithms, many (perhaps most) specific to subsets of camera models. Each of those algorithms needs its parameters, typically specific to the camera model. The task of a raw converter is to supply and run those algorithms. The task of a common raw format (CRF), if one exists, is to contain the required parameters, both to enable the raw converter to select the required algorithms, and to enable it to run the selected algorithms with the right camera parameters.

A CRF (common raw format) can't itself compensate for lack of the required algorithms. If a raw converter doesn't supply algorithms to cater for weak or zero AA filters, it doesn't matter what AA filter parameters are in the CRF. Ditto for algorithms to cater for offset sensor elements as in Fujifilm cameras. (And so on, including Foveon's special requirements). So the existence of a CRF can't (which an exception I'll come back to) enable a raw converter to handle subsets of cameras for which it doesn't supply the algorithms. That is one complaint about DNG: "why doesn't it cause this raw converter that doesn't handle original RAFs to handle them when they have been converted to DNG?" The answer is: "because using raw deliberately postpones a lot of work to the raw converter, and if the raw converter of choice can't do that work - tough!"

The exception is a non-default option in Adobe's DNG conversion code to convert to Linear DNG. This typically (not for Foveon for which different principles apply) means the demosaicing is done before the DNG file is written, so there are 3 or more channels. (Mostly 3, but the F828 has 4). This raises the question "doesn't that mean that whatever software handles the Linear DNG file can't possibly give better results than Adobe software?" Curiously, the answer is "no". I'll come back to that later.
Then there's the issue of color.
[snip]
What sort of color information does DNG contain? Did Adobe look at
how other raw converters do color, and make DNG capable of
satisfying every raw converter's needs? Did they ask other raw
converter writers (you know, like you do if you're really creating
an open standard, instead of just making a lot of noise about doing
it)? No. They simply gave DNG the kind of spectral coefficients
used by Adobe Camera Raw.

So, DNG isn't good for the consumer, it's good for Adobe. It
insures that no other raw decoder can ever outperform ACR. Is it
any wonder that so few are buying into it?
The people who convert to DNG, then use non-Adobe software because they believe the latter gives better results, would disagree with you! Some people believe that Silkypix can process their raw DNGs better than Adobe software can, and/or can handle their Linear DNGs from Foveon sensors better than Adobe can handle X3Fs. In other words, the specific camera details, or the demosaicing, or the initial conversion in the case of X3Fs, turns out to be only part of what makes photographers favour one or another raw converter, even for image quality rather than workflow.

So can DNG cater for all those extra details that some (not all) raw converters need? And can raw converters still work if they are not present?

There are parameters in the DNG specification that I have never seen used. For example AsShotPreProfileMatrix& AsShotPreProfileMatrix. AsShotPreProfileMatrix: "This tag contains an ICC profile that, in conjunction with the AsShotPreProfileMatrix tag, provides the camera manufacturer with a way to specify a default color rendering from camera color space coordinates (linear reference values) into the ICC profile connection space". Similarly, there is another pair, of which CurrentICCProfile says: "The CurrentICCProfile and CurrentPreProfileMatrix tags have the same purpose and usage as the AsShotICCProfile and AsShotPreProfileMatrix tag pair, except they are for use by raw file editors rather than camera manufacturers".

I don't know how far these would go to satisfy the raw converters that want more than the basic matrices that map between the camera color space coordinates and CIE XYZ coordinates, used by Adobe software.

Silkypix, (perhaps like some other raw converters?), uses the colour data from the DNG if it doesn't have any data of its own for that camera model. If it does have that data, it offers the user a choice of which to use. Personally, I don't like the default colour rendering of ACR, so I have used a calibration script using my GretagMacbeth ColorChecker to modify the ACR defaults. Other raw converters may provide their own camera calibration capability, and hence override the DNG/ACR defaults. Raw converters are not contrained to use only the basic DNG CIE XYZ transformation matrices.

In response to a recent question from me, Thomas Knoll responded:

"Yes, a new version of the DNG spec is planned, probably during the first half of 2007. Currently the only new tag Adobe is using is the ColorimetricReference tag, which is already included in the DNG SDK. It it is hint to the raw converter so it can select the correct default conversion parameters. (If the data is already in the ICC profile PCS, then the converter probably needs different default values, so it can skip the scene referred to output referred mapping normally required for raw data).

"We are currently talking to various developers who have some requested changes in the DNG specification".

http://adobe.groupbrowser.com/post907356-4.html
 
Joseph S. Wisniewski wrote:
[snip]
Camera manufacturers have been encrypting parts of raw files for
years. Raw file decoder writers (including Adobe) quickly (but
quietly) cracked the encryption. Nikon was unfortunate enough to
adopt Canon style encryption of the D2X white balance parameters at
a time when Adobe needed a diversion, so instead of doing business
as usual and cracking it (Dave Coffin did it within 72 hours of
someone sending him his first D2X raw file) they put man-years into
a media blitz of press releases, software development, and pompous
speeches about Adobe being the white knight who was going to save
you from the evils of encryption.

In short, they created an enormous pile of DNG.
[snip]

Are you connecting the D2X matter with DNG? The dates don't match:

Adobe started working on the DNG specification towards the end of 2003, began talking to other companies about the start of 2004, and hinted at it at Photoshop World in March 2004. Then they launched it in September 2004:
http://www.barrypearson.co.uk/articles/dng/history.htm

The D2X was first supported in ACR 3.1, supplied in May 2005 at the release of PS CS2 as a replacement for the included ACR 3.0. Then Nikon provided a mini-SDK which Adobe started to use in ACR 3.2 in September 2005.
 
Not at all. It's a lot more than a bit of metadata. It's a question
of fundamental algorithms.

For example, any raw decoder can handle a basic Bayer pattern raw
file with fairly colormetric (responding to color like the human
eye) filters and a strong anti-aliasing filter. That got you an
acceptable image from the basic Nikon D100 or Canon 10D style
camera.

But if you have a weaker AA filter, you now need some sort
algorithm to reduce moire (red and blue color bands across detailed
areas). If you want to decode a Leica DMR or M8 file, you need an
....

You're right, for best results you'd of course have to know very technical details specific to each camera model - stuff that is not stored in a one-for-all file format. But that information is not in the RAW file either. The vendor's propritary software knows which camera created a RAW file and uses the appropriate algorithms.

That does not mean DNG is useless. Most DNG-capable software will use the parameters in the DNG and generic algorithms to produce "good enough" results. Better software will inspect the Make and Model recorded in the DNG and apply the appropriate algorithms.

Compare to TIFF and color spaces: most software can read TIFF files but ignore the color space info. Hence most software is "good enough" but for the best rendention of TIFF pics, a color-space aware app is a must.

Adobe, just like Nikon/Canon/Sony/etc is a for-profit company. They do whatever is in their best interests - not necessarily ours. But we can use their idea of a universal RAW file format to achieve our goals.

The real solution, IMHO, is a standardized file-format and openess on the camera vendor's part. We need to know how to READ the data (standard file format) as well as how to INTERPRET it (camera technical details)

Today DNG is the best we have to an open, widely-supported format for RAW image data. As more software and cameras support DNG, that (hopefully) will convince the Big Brands to support an open format as well.

I think there are some cameras that only output RAW files as DNG, so DNG files needs to be supported by most software anyway - not that much more complexity.

Personally, I archive all the files straight from the camera. I don't have a pressing need for DNG in my workflow; Windows and Nikon isn't going out of style any time soon, giving me a few years to see if DNG is the right solution for archiving.

Cheers,

-J
 
Think of it this way. If you had archived documents back when you
had a TRS-80, or an Apple ][ computer, and you had archived a
conversion program along with those documens, would you still be
able to run that conversion program?
Of course you would.
Emulators are not a magic bullet... for example, Nikon Capture and Microsoft's Virtual PC. Some (all?) versions of Nikon Capture have anti-priacy feature that just will not work in Virtual PC. Emulation technology is improving but the nature of those companies is to protect their "intellectual property" and I bet they will keep up with VM/emulator technology so their copy-protection can't be circumvented.

And look at how much of today's software requires "activation". It's much harder to archive and emulate the vendor's license activation service. :=)

So even if you archive your PC and your camera's software, it might be useless because the company cannot/will not activate your license in the future!

Boo...
-J
 
That's interesting stuff. Not sure if I would want to trust my
pictures to some emulator, but definitely interesting stuff.
An important question is whether in future people will be able to
access their old images with their future workflow and tools of
choice. Ideally, surely that is what we want? That shouldn't
involve emulators, etc.
Quite true. But we were describing emergency measures. Then again, you already knew that.
[snip]
Yes, I am aware of dcraw and I actually keep copies of it around
for my own use. As a programmer myself, I have looked at the code
and made sure I felt confident I would be able to use it 30 years
from now if the NEF file format would otherwise have become
obsolete.
Good idea. It also processes DNG, of course - including DNGs for
cameras not yet released.
No, it doesn't. It processes DNG only for cameras that it already knows how to process the raw for. But you already knew that, too.
[snip]
I have my doubts if DNG is that single standard; I'm not convinced
by it at all. Looks like they are trying to be everything to
everyone. I think a real standard archival format should be much
simpler, storing the binary pixel data in a clearly defined fashion
(no fancy compression) plus possibly additional tags in some XML
data. Something people can figure out in a couple of hundred years
by just looking at the data, without the need of extensive manuals.
That is a bit optimistic, but DNG does store the binary pixel data,
and optionally without compression. (Although the optional
compression is JPEG lossless compression, which is documented, even
if not widely used).

Most of the additional tags are held in a TIFF 6.0 tag-structure.
If we lose knowledge of TIFF in future, then, yes, we will lose
knowledge of DNG, and LOTS more besides. (NEFs also use a structure
based on TIFF 6.0).
So, are you admitting that DNG brings us nothing that NEF doesn't have already?
A problem isn't just what the data looks like. It also what
relationship do those sensor values have to the original scene -
what tones and colours in the original scene give particular
values? And there is more camera-knowledge needed too. What DNG
does is add information about this to the file,
Oops, back to the old pattern of fluff.

--
Normally, a signature this small can't open its own jumpgate.

Ciao! Joe

http://www.swissarmyfork.com
 
People generally don't convert to DNG for the purpose of saving
space. The main reason is that most RAW formats, including NEF, are
proprietary. The file format of those RAW files are often unique
for each type and brand. There's no guarantee that you can open
your precious RAW files in the future with newer software.
[snip]

Correct. There are various benefits to DNG,
Which fall apart when looked at objectively.

DNG was a diversion, nothing more.

--
Normally, a signature this small can't open its own jumpgate.

Ciao! Joe

http://www.swissarmyfork.com
 
Adobe (and every other 3rd party software developer for that matter) REVERSE ENGINEER their RAW converters for NEF files. Nikon do not share the file specifications with anyone. The BEST RAW converter for Nikon NEF's is the Nikon product and the best file format is NEF. Period. NEF to DNG is not "lossless".
--
Cheers.
 
Use DNG if you plan on adopting an "adobe workflow" where you'll be almost exclusively using Adobe software. This way you can work on photos thru Bridge/Lightroom without having to deal with folders full of sidecar files.

Having the embedded preview inside your DNG file will also let 3rd party viewing software like Photo Mechanic give you an accurate preview of your RAW file after it's been tweaked thru ACR. Otherwise, the preview you'd get would be the embedded NEF picture, generated by Nikon, and would not represent the changes you've made thru ACR or Lightroom.

That said, when I did so, I think my DNGs were bigger than my uncompressed D200 NEFs. And DNG compression was turned to on, so I did not really see the space savings there ...

DNG long term "compatible" archival purposes is a complete baloney. Who knows Adobe might not even exist in 30 years anymore, and DNG format could be extinct as well. Not because its an open license that it garantees infinite longevity. This is just a case of a company trying to have everyone else adopt a standard they created, and overall benifiting them the most on a marketting standpoint.

Tens of thousands of people are currently using the NEF format you can be sure that if Nikon were to shut its doors one day, there would still be software out there allowing you to convert your NEFs to Tiffs, or whatever the new file format of the future will be.

It's not like people are going to archieve their NEF files, then go on a 40 years long trip to the moon, then come back to Earth and say "shiat, NEF has disappeared 15 years ago what am I gonna do now??!?!?!?!"

To me right now the real problem is companies like Nikon "encrypting" their RAW data so that only their own software can decrypt the information with 100% accuracy. That's complete garbage. Nikon should concentrate on their camera & lenses, and let others who have more resources concentrate on the software.

A NEF should look exactly the same on ACR, Nikon Capture, Bibble, etc. Customers's choice should be on which converter offers them this or that feature, and certainly not being held hostage by a company because they're the only one with the "true decryption data".
 
JamesBird wrote:
Good article. A couple of points:

[snip]
That does not mean DNG is useless. Most DNG-capable software will
use the parameters in the DNG and generic algorithms to produce
"good enough" results. Better software will inspect the Make and
Model recorded in the DNG and apply the appropriate algorithms.
Another option is the allow the user to fine-tune the generic algorithms to achieve better than "good enough". (For example, I have calibrated my camera and set up ACR to use my calibration values). I believe various raw converters allow extra profile information to be supplied, or other fine-tuning?

[snip]
The real solution, IMHO, is a standardized file-format and
openess on the camera vendor's part. We need to know how to READ
the data (standard file format) as well as how to INTERPRET it
(camera technical details)
I think Pentax are setting an interesting example. They have supplied their own software that converts PEFs from all of their raw-capable cameras to DNG. (So Pentax users can convert to DNG using Pentax or Adobe software once Adobe catch up). Their latest camera gives the user the choice of whether "raw" means "PEF" or "DNG". Their raw conversion software can process DNGs output by any of their products (camera or software). This means that Pentax have, in effect, published their interpretation of their cameras in terms of the DNG specification - just look in the DNG. (I suspect they will eventually cease using PEF and just use DNG in-camera).

[snip]
I think there are some cameras that only output RAW files as DNG,
so DNG files needs to be supported by most software anyway - not
that much more complexity.
[snip]

There are various combinations. Cameras & backs whose only raw format is DNG. A camera with an option of PEF or DNG. Camera manufacturers that use their own format in-camera but supply their own DNG conversion software. (And some DNG converters supplied by "amateurs" who want their niche or minority or hacked cameras to be supported to be supported by mainstream raw converters). For interest, there are about 10 or more DNG Converters, of which Adobe provide 3.
http://www.barrypearson.co.uk/articles/dng/products.htm#manufacturers
http://www.barrypearson.co.uk/articles/dng/products.htm#converters
 
Correct. There are various benefits to DNG,
Which fall apart when looked at objectively.

DNG was a diversion, nothing more.
Joe, one question (even if a little off-topic): Will things be
different with an hopefully developed open source RAW format? What
are you expecting?
An open raw format would be a little different.

If whoever put it together got consensus from the major raw converter writers as to how to represent things like color and AA filter PSF. (this would probably involve a superset of how Adobe wants to do color, how P1C1 does it, Bibble, Silkypics, etc).

And some agreement on fallback strategies so that the converter could do a decent job on unrecognized formats.

There would still be the problem of a raw converter needing all those weird algorithms to deal with Foveon layers, Fuji HDR and diagonal Bayer arrays, Sony RGBE, Leica aliasing, but at least with consensus on things like color and AA, all converters would stand a chance of doing the best job they could, not just the best Adobe says they should.

Personally, I don't see anything so tricky about the actual packing and unpacking of each vendor's image data that you couldn't just leave OEM raw files alone and build a "universal sidecar" that would give you all the metadata in a user friendly format. The sidecar would tell each raw converter how to best decode that image data, and allow setting modifications to be changed in a way that any other decoder could parse. Picture adjusting the exposure in ACR, and having that exact same exposure adjustment available in Bibble.

Adobe had that going with XMP, and I'd say DNG just diverted effort from what could have been a real, useful solution.

--
Normally, a signature this small can't open its own jumpgate.

Ciao! Joe

http://www.swissarmyfork.com
 
Barry Pearson wrote:
[snip]
Good idea. It also processes DNG, of course - including DNGs for
cameras not yet released.
No, it doesn't. It processes DNG only for cameras that it already
knows how to process the raw for. But you already knew that, too.
Not true. When I tried dcraw v8.21, it was at a time that dcraw didn't support the Sony A100 ARWs, but the DNG Converter did. (Sony had disclosed information to Adobe under NDA). dcraw processed the A100 DNG, but not the ARW from the camera.
http://www.barrypearson.co.uk/articles/dng/dng_not_native.htm#example5

Obviously it is rare for DNGs to exist for a non-DNG camera before dcraw supports the native raw format. But when it happens, dcraw is seen to support DNG in a way that doesn't require it to support the original raw files.

[snip]
Most of the additional tags are held in a TIFF 6.0 tag-structure.
If we lose knowledge of TIFF in future, then, yes, we will lose
knowledge of DNG, and LOTS more besides. (NEFs also use a structure
based on TIFF 6.0).
So, are you admitting that DNG brings us nothing that NEF doesn't
have already?
[snip]

Of course not, and it doesn't follow from what I said. I was simply making the point that we need to remember what TIFF 6.0 is like for various reasons.
 
Kallel00 wrote:
[snip]
DNG long term "compatible" archival purposes is a complete baloney.
Who knows Adobe might not even exist in 30 years anymore, and DNG
format could be extinct as well.
Not true. We know there will be C-code then that will support today's cameras. The US Library of Congress has identified DNG as its preferred alternative to camera manufacturer's raw formats which it doesn't recommended, and they have an interest in its support or conversion to a newer format. The specification is openly-documented, there is a code-based SDK, and there will be vastly many millions of DNGs in existence.

[snip]
Tens of thousands of people are currently using the NEF format you
can be sure that if Nikon were to shut its doors one day, there
would still be software out there allowing you to convert your NEFs
to Tiffs, or whatever the new file format of the future will be.
[snip]

The problem isn't with the NEF format itself. The problem in future is that developers of new raw converters may have trouble testing today's cameras so that they can identify the detailed parameters (not in the NEFs) they need to process the data they get from the NEFs. (How will those developers test a D200 in 30 years time?) I guess they will have to obtain the parameters from today's software, and derive what they need from these? Will they bother? Or will they support DNG, then invoke a DNG Converter to convert those D200 NEFs to DNG?
 
Your CDs & DVDs probably will not last as long as the file format anyway, so what does it matter?

I have a feeling in ten-twenty years a lot of photographers will have CDs & Files that will not read....

I convert everything to DNG and store it on DVDs, but their is no guarantee there also.
--
John
http://www.johngermanyphotography.com
 

Keyboard shortcuts

Back
Top