DNG
DNG is a file type that was developed by Adobe Systems Inc. to address a number of issues that surround raw file image processing. It provides a documented file structure that can standardize the way camera information is stored. It also provides some important capabilities for non-destructive parametric image editing.
Introduction
Three types of DNG files
Comparing raw to DNG
The embedded checksum
Is this just for Adobe software?
DNG options
Backwards compatibility
Making DNG files
When should you convert?
Updating DNGs
Introduction
The DNG file format takes its name from the concept of a Digital Negative. It is a file format suitable for the storage of raw digital camera information. It has been developed by Adobe as a standardized file structure for the various kinds of information that live inside an image file.
In addition to standardizing the basic information structure, DNG provides for the storage of other kinds of data that are useful in parametric image editing. This includes processing instructions, image metadata, verification tools, color profiles and more.
While some cameras have adopted the DNG format as an in-camera raw format, it’s also possible to convert files to DNG at some later point in the workflow. Much of the discussion on this page will outline the characteristics and workflow associated with a DNG converted from a proprietary raw file.
DNG provides a very robust and useful workflow tool for modern imaging software, particularly for imaging of digital camera raw files. DNG also provides important functionality for the preservation of your image file – and your processing intent – in a photographic archive.
Submitted to ISO
Adobe submitted the DNG to the International Standards Organization (ISO) in 2007 as a standard raw file format. No ruling has been issued yet.
Three types of DNG files
There are, broadly speaking, three types of DNG files, in-camera, converted DNG, raw; and converted DNG, linear.
- In-camera DNG – Some camera manufacturers have adopted the DNG format as their own camera raw format. When you shoot a raw file with a Leica M9, it will be DNG. The Pentax K5 offers the option of shooting in PEF raw or DNG raw. 
Figure 2 Some cameras can produce a DNG as their native format.
- Converted DNG, raw – When you make a DNG from a raw file, you typically have the option to save the original raw image data as is, in all its rawness. These files have all the image information that the camera wrote into the original raw file. There is one camera sensor that is not supported as a converted raw DNG, and that is the Foveon sensor used in Sigma cameras. This is a fundamentally different type of raw image data than other DSLR cameras use. To save a Foveon raw file as DNG, the file must be saved as a Linear DNG.
- 
Figure 3 It’s possible to convert a raw file to DNG and retain all the rawness.
- Converted DNG, linear – It’s also possible to save a DNG with some of the rawness processed out of the file. This is called a Linear DNG. These can be useful for enhanced compatibility. It’s also possible to convert a JPEG or TIFF to DNG, and that will produce a Linear DNG file. 
Figure 4 A Linear DNG has some of the image decoding “baked-in”. DNGs made from TIFF or JPEG originals are also Linear.
Comparing raw to DNG
In order to understand DNG, it’s helpful to compare it to a camera raw file. There are quite a few similarities, and a number of important differences. The items below compare and contrast a proprietary raw and a Converted DNG, raw.
Similarities
Here are the ways that camera raw and DNG files are alike.
- TIFF/EP format – Camera raw files are typically some flavor of the TIFF/EP format, which is a type of TIFF file that is specifically designed for “electronic photography.” So the basic file structure is the same.
- Can store a raw image – Both DNG and raw can store the raw image data that your camera produces.
- Can store a JPEG preview – Both raw and DNG can store a full-color JPEG version of your raw file. This makes the image easy to preview. It’s what you see on the back of your camera when you shoot raw.
- Can store metadata – Raw and DNG can each store metadata. This includes the camera information (EXIF) data that digital cameras use to describe the image. In both cases, this can include proprietary information that the camera maker chooses to encrypt.
Differences
There are some very important differences between raw and DNG, however.
- DNG has a published specification – While both raw and DNG are similar in structure, only DNG has a well-documented and published file specification. This openly documented structure allows DNG to be manipulated by third-party software very safely. Most proprietary raw files are undocumented, which means that any software that alters a file may break something unknowingly.
- The DNG Specification has versions – As imaging technology moves forward, new software functions can become incompatible with older software. DNG has anticipated this, and uses version compatibility tags to help manage the process.
- DNG can store nearly unlimited metadata – It’s possible to store just about any type of metadata in a DNG file, and to store as much of it as you like. This makes it easy to tag your images for subject matter as well as ownership and licensing information, along with other useful information.
- DNG allows the attachment of processing instructions – DNG has a very robust metadata storage capability. This means that the settings you use to render your images can be embedded in the DNG file for added security and portability. You can even store multiple groups of settings, or settings from more than one program.
- DNG anticipates imaging needs – The DNG specification has a very robust “tag” structure that allows for the orderly storage of all kinds of image processing data. These tags anticipate new developments in image processing, often long before any software actually needs to make use of them.
- DNG allows for embedded profiles – All raw files must be decoded using some kind of color profile to transform the raw data into standard color. The DNG specification requires that at least one color profile be embedded in the file. This will allow the file to be decoded long into the future. In addition to the Adobe standard profiles, DNG provides for storage of custom camera profiles and profiles from third-party manufacturers.
- DNG allows rendered versions to be embedded – While proprietary raw files do have an embedded JPEG for previewing, that file is generally not updatable as the file gets edited. This means that the preview will show the original version, not the version after it has been optimized. Because the DNG structure is openly documented, it’s easily possible to embed an optimized version of the file. The specification even provides for multiple versions to be embedded.
- DNG has an embedded verification tool – This is particularly important for long-term archiving. There is an embedded checksum in the DNG file that can be used to tell if the raw image has become corrupted in any way. This can provide an easily automated way to check on the health of a very large image collection automatically.
Figure 5 provides a chart that outlines the many features of the DNG file format. 
Figure 5 This diagram outlines all the component parts of a DNG file. As you can see, file formats can get pretty complicated.
The embedded checksum
One of the most valuable features of DNG is the embedded checksum – a tool that allows you to check on the integrity of the image data at any point in the life of the file. This provides data verification even after the file has been edited, and metadata has been embedded back in the file or the embedded preview has been updated. This capability is unique among all imaging formats.
Read more about DNG verification on the File Validation section
Is this just for Adobe software?
Because the DNG was developed by Adobe, there is a misconception that it’s an Adobe-only format. While Adobe software does the best job currently of making DNG conversion files, many applications can take advantage of the format’s capabilities. In fact, DNG’s greatest strength is the ability to pass information between applications. In this way, DNG is like another format that Adobe controls: TIFF.
Apple, for instance, uses the DNG format to make new cameras compatible with Aperture before they are officially supported. When a new camera comes out that Apple is not yet compatible with, it’s typically possible to convert that raw file to DNG with the Adobe DNG converter, and then open it in Aperture.
Many other programs offer some level of compatibility with DNG. The format is supported on a system level by Mac and Windows OS, and there is a Linux application for conversion and reading of DNG.
Incompatibilities
There are some important incompatibilities with DNG. Chief among these is camera manufacturer’s software, if DNG is not the native camera raw format. Both Canon and Nikon raw conversion software do not support DNG, although Capture One software from the camera manufacturer Phase One does support the format. Other popular imaging software that does not support DNG includes DxO (can’t read a DNG, but it can create a linear DNG) and Bibble, which can’t read or write DNG.
DNG options
The DNG file specification provides a number of options, and that number is likely to grow. Let’s outline what those options are.
Compatibility
When you make a DNG, you have the option of making the file backwards-compatible with older software. As a rule, you should use any backwards compatibility only when you need to in order to open the file. That’s outlined below much more thoroughly.
Linearize
Linearizing a DNG bakes in much of the conversion from a raw file. Adobe has buried that option three screens deep in the DNG converter because they really don’t suggest you do it unless it’s absolutely necessary. Only do this because you have to make the file compatible with some software, when no other method works. (Backwards compatibility will make use of Linearization only when it absolutely must do so, to make a file compatible).
Embedded preview
One of the most useful features of DNG is the ability to embed a preview in the file that displays the image after you have made your adjustments. This is particularly helpful if you need to look at the file with software other than that with which you made the adjustments. This is particularly valuable for third-party DAM software. In these cases, it’s helpful to have a large embedded JPEG preview in the DNG. It makes the file a bit larger, but it’s extremely useful.
Embed original file
You can embed the original source image in the DNG. This can make the file very large: it will add the the full additional size of the original file. This is desirable if you want to preserve the ability to open the image with software that does not support DNG, or if you need to choose a backwards-compatibility setting when you make the DNG.
Make DNGs from rendered files
It’s possible to make DNG files from JPEG, TIFF and PSD files (flat TIFFs and PSD only, no layers). In most cases, this is not a particularly valuable thing to do. When you make a DNG from a JPEG, the file gets much larger – as large as a corresponding TIFF.
There are some cases where it can make sense to make DNGs from TIFFs. If you have a collection full of scans, such as PhotoCD conversions, and you’ll be editing them in Lightroom, you’d get a few workflow advantages. The DNG would get the embedded checksum, which would be valuable for file verification. And the DNG could include a preview of the optimized file. All the advantages would disappear if you take the file to Photoshop, however, since you would be required to save it as a TIFF or PSD to save the Photoshop changes.
Backwards compatibility
The DNG format makes backwards compatibility possible in several different ways. Sometimes this is done without any loss of quality, and sometimes it requires “baking in” some of the changes to the raw file, which does remove some flexibility to re-edit your files. Let’s look at the issues.
Enhance camera compatibility
Sometimes DNG backwards compatibility is used to make a newer camera compatible with older software. Because software must be engineered to decode each particular flavor of raw file, a new camera’s raw file may be incompatible with older software. DNG provides an orderly restructuring of the file data, and a color profile for the camera model, so that even older software may be able to open a newer file.
This is often used by people who own older versions of Photoshop and want to open files from new cameras. It’s also a common work-around for Aperture users with this same issue. In most cases, there is no loss of quality, particularly if it’s possible to use the most recent compatibility setting when you do the DNG conversion.
Remove incompatible features
Sometimes the backwards compatibility must be done by linearizing the DNG because some new features are not supported by older software. For instance, the Panasonic LX5 camera requires some image de-warping in the raw conversion in order to remove lens distortion. Older Camera Raw versions did not support this function. In order to open these new files with old software, the DNG must be created with the de-warping baked in to the DNG, which is done by selecting a Compatibility prior to the latest version, as shown in Figure 5. This is a “lossy” operation, since you’ll be making changes that can’t be undone.
Figure 6 In order to make a DNG compatible with an earlier software version, you may need to choose a compatibility setting that is from a previous specification. Only use these when your testing shows that current compatibility is not supported with your combination of camera and software.
Only choose backwards compatibility because you need to
So how do you know if the DNG you are making is baking in some kind of changes, or if you even need to? Here’s the simple rule. Only choose the backwards compatibility because you need to – and you only need to because the most recent compatibility version does not work. That is, the file won’t open in the older software when the DNG was made with a more recent compatibility.
Sometimes you may want to choose an older compatibility version because you need to send the file to someone who does not own the latest software. Sometimes you might need to do this because you don’t own the latest software.
Consider embedding the original whenever you choose earlier compatibility
Whenever you are forced to use an older compatibility, you are baking in some kind of changes. This is a time to consider embedding the raw file in the DNG, particularly if you need to set backwards compatibility to your own copy of the DNG.
Let’s take the case of the LX5 raw files outlined above. If you are opening these with Photoshop CS3, and therefore need to choose Camera Raw 4.6 as the compatibility version, we strongly suggest that you choose to embed the raw file in the DNG, as shown in Figure 7. This will provide you with the full rawness of the image when you eventually get software that supports the LX5 natively. 
Figure 7 You can choose to embed the original file. This is good practice whenever you need to make a DNG backwards compatible.
Making DNG files
If your camera does not shoot a DNG natively, you can create DNG conversions in one of several ways. At the moment, we suggest that Adobe software be used to do the conversion because of its full support of the latest DNG features. There are three applications that Adobe provides to create DNG files: Adobe Camera Raw (part of Photoshop), Lightroom, and the free Adobe DNG Converter.
Converting with Photoshop
You can create DNG files with Photoshop by using Camera Raw. Any raw files opened in Camera Raw can be saved as DNG files using the “Save” command. You specify DNG in the “Format” pulldown and a new DNG is created leaving the old one in place, as shown in Figure 8. 
Figure 8 To make a DNG out of Photoshop, first you need to open a file in Camera Raw and then choose “Save”. DNG is one of the formats you can choose.
Converting with Lightroom
There are three ways to convert to DNG in Lightroom. You can convert the photos when you download and import the photos, you can use the Export command, and you can use the menu command Library>Convert Photos to DNG when you are in the Library Module.
Conversion on import is a good option for people who are committed to a DNG workflow, and would like to set the file verification tags at the earliest possible opportunity. Note that it can take some significant additional time to do the conversion, depending on the raw file size, computer used and number of files in the download. Lightroom offers conversion in the ingestion process, as shown in Figure 9. 
Figure 9 When importing raw files into Lightroom, you have the ability to copy as DNG, which makes the DNG during the ingestion process.
The Convert Photos in the Library module, shown in Figure 10, is useful for converting your own photos at some point after ingestion. This method provides the ability to replace the proprietary raw file with the DNG, and to have all the publish information, flags, collections and history remain associated with the new file.
Figure 10 You can convert images in Lightroom to DNG by selecting the photos, and then choosing Library>Convert Photos to DNG. This provides the ability to replace the proprietary raw file with a DNG.
To create DNG files from the Export command, select the files and choose “Export”. One of the Lightroom presets is already configured for DNG conversion, as shown in Figure 11. In general, the Export command is useful if you are creating a DNG to send off to someone else. This creates a DNG in a location you specify, while it leaves the raw original (or DNG original, if the source file is a DNG) alone.
Figure 11 The Export command contains a preset for conversion of your raw to DNG. Note that while you can include video files in this export, they are NOT converted to DNG.
Using the Adobe DNG converter
It’s also possible to convert to DNG without buying any Adobe software at all. The DNG converter is available from Adobe for free, and can create a set of DNG files while leaving the original raws untouched. This would be a good solution for an Aperture user who is making a new camera compatible with older software. Figure 12 shows a typical set-up for DNG conversion. 
Figure 12 When you use the free DNG Converter to make DNGs, it creates a new folder of files and leaves the old ones untouched.
When should you convert?
If you like what DNG has to offer and want to take advantage of it as a workflow and archive format, you will probably need to make some choices about when to convert to DNG. Should you do it on ingestion, early in the workflow, or immediately prior to archiving? Here are some considerations.
Convert at Ingestion – The strongest argument for this is the presence of the embedded checksum for file verification. The earlier this is created, the more protection it offers. This is particularly true since early-lifecycle workflow often requires the transfer of the files between drives.
On the other hand, conversion during ingestion can make the process considerably more time-consuming. In many cases, there’s simply no extra time to convert during ingestion.
Early Working conversion – You can also convert sometime after ingestion, but still early in the editing process. Again, an early conversion creates the verification and provides more protection than later conversion. And this can often be done at the end of a session, when the computer is not doing any other chores.
You might want to delay this conversion, however, if you like to make sure you archive your DNGs with a good adjusted preview. Updating the preview in a converted DNG takes as long as making the conversion in the first place. Some people put the conversion off until just prior to archiving.
Convert prior to Archiving – In this workflow, the conversion is done just prior to archiving the files, in order to make sure the DNG is created with a good embedded preview. It will also make sure that other settings are included in the DNG, such as any custom camera profiles and rendering settings.
The biggest drawback to this workflow is the late creation of the checksum.
This is also an issue at the moment for people who use DNG as the in-camera raw format. At the moment, no in-camera DNGs include the verification checksum. Additionally, no in-camera DNG files would contain custom camera profiles and updated previews that are attached in the PIEware.
Updating DNGs
There are four basic reasons one may want to update DNG files.
- Informational metadata may have changed (such as your address) or may be newly created (such as new keywords). You may wish to attach this information to the files.
- Rendering settings may have changed, and you may wish to embed these new settings in the DNG file. Note that the settings are only the instructions for adjustment, which is separate from the embedded preview.
- You may wish to update the embedded preview, usually because you want some other program to see a newer interpretation of the rendered file.
- The DNG file format may have been revised, and you may wish to take advantage of the new capabilities.
Items 1 and 2 above do not require “remaking” the DNG, since the metadata and the rendering settings live in the file header, which can easily be updated. If you want to update the embedded preview, however, you’ll have to go to some extra effort. Here’s a rundown of how to do this with Adobe Software.
Using Adobe Camera Raw in Photoshop
When you add metadata to a DNG in Bridge, the DNG file is automatically updated with the new information, so that part’s easy. To update the embedded preview (or to convert the DNG to the newest version), go to the flyout menu in Camera Raw just under the Histogram and select “Update DNG Previews...”, as shown in Figure 13. 
Figure 13 To update the DNG previews with Adobe Camera Raw, select the flyout menu (on the same line here as “Details”) and then select the item “Update DNG Previews...”
Using Lightroom
Lightroom offers two menu commands for updating DNG files. “Save Metadata to File” will update the metadata only, including rendering settings, but will leave the preview untouched. This runs very quickly. “Update DNG Preview & Metadata” updates both the metadata and the embedded preview. Both are found in the Metadata menu in the Library module, as shown in Figure 14.
Figure 14 In Lightroom, “Save Metadata to File” updates metadata only. “Update DNG Previews and Metadata” does both, as its name implies.
Up to File Format
Back to RAW
On to Rendered File Formats