Introduction
DNG is an open raw image format published by Adobe in 2004. Most camera makers use a raw format of their own; DNG gives raw photos a single documented format that any program can read, with everything needed to develop the image stored in the file itself.
Some cameras and phones save DNG directly. Adobe’s free DNG Converter turns other raw files into DNG, and can embed the original raw file inside it.
Structure
A DNG file is a TIFF file, with the same header and image file directories, and extra
tags defined by the DNG specification. The DNGVersion tag marks the file as
DNG. The first directory usually holds a small preview image and the metadata, and the
raw sensor data sits in a sub-directory marked as the full resolution original. Files
over 4 GB can use the 64-bit BigTIFF layout.
Tags carry what a raw converter needs to develop the picture: the colour filter pattern of the sensor, black and white levels, colour matrices for up to three light sources, lens corrections as opcodes and optional camera profiles. Further directories can hold transparency masks, depth maps, enhanced images and semantic masks. The raw data may be uncompressed or compressed without loss; version 1.4 adds lossy JPEG and deflate, and version 1.7 JPEG XL.
The reference pages cover the raw data layout and codes, every DNG tag, and the processing opcodes.
0TIFF header byte order, 42, first IFD offset8 bytes…IFD 0 preview image,DNGVersion, colour and camera tagsvaries…Sub-IFD the raw sensor datavaries…Exif IFD exposure, lens and datevaries
Not described
Adobe publishes the DNG specification, but its 1.7 PDF could not be fetched for these pages (Adobe returned 403). They follow the 1.6.0.0 PDF and the 1.7.1 DNG SDK source; the parts below are not covered yet.
Known, not yet covered
- Reference: any 1.7 wording that the SDK source does not show; the 1.7 specification text itself has not been read here. The tags page covers every tag of the SDK.
- Reference: the JPEG XL, lossy JPEG and other compression codes are listed on raw data by code, but the coded streams are those formats’ own specifications, not described here.
- Viewer: none. The file opens as raw bytes only.
Unknown
- Reference: the layout of the ImageStats tag, the meaning of the
gamma value in ProfileGainTableMap2, the values of the ImageSequenceInfo sequence type
and the status of the JUMBF tag (
0xCD41); the SDK source read does not settle them (tags).
Links
Software
- Adobe Lightroom – Adobe’s photo library and raw developer (Windows, macOS, mobile)
- Adobe Photoshop – image editor that opens DNG through its Camera Raw plug-in (Windows, macOS)
- Adobe DNG Converter – free tool that converts other camera raw files to DNG (Windows, macOS)
- Capture One – raw photo editor for professional photographers (Windows, macOS)
- darktable – free raw photo developer (Windows, macOS, Linux)
- RawTherapee – free raw photo developer (Windows, macOS, Linux)
Developers
Reference
- Digital Negative (DNG) – Adobe’s page with the specification and the DNG SDK