RAW, DNG and color
Deptheos stacks camera RAW and DNG files as linear camera data, without turning them into ordinary pictures first, and can save the result as a DNG that you edit like a RAW file. JPEG, PNG and TIFF files are stacked as the pictures they are.
| Your frames | Save as DNG? | How they are stacked |
|---|---|---|
| Camera RAW (CR3, NEF, ARW…), desktop | Yes | Decoded by LibRaw or Adobe DNG Converter, stacked as linear camera RGB |
| DNG | Yes | Read with the Adobe DNG SDK, stacked as linear camera RGB |
| JPEG, PNG or TIFF | No | Stacked as they are, in their own color space; saved as TIFF, PNG or JPEG |
| Camera RAW on iPhone and iPad (coming soon) | Yes (LibRaw) | Linear camera RGB with built-in LibRaw (DNG out), or rendered with Apple's Core Image (details) |
Developing after stacking
Converting a bracket to TIFF or JPEG before stacking bakes white balance, tone curves, and clipped highlights into every frame. Stacking camera RAW or DNG files directly in Deptheos keeps alignment, stacking, and retouching in linear camera RGB, so you can export a 16-bit linear DNG and do your RAW editing once, on the finished stack.
- RAW frames
- Develop to TIFF / JPEG
- Stack & retouch
White balance and highlight recovery are locked in before stacking.
- RAW frames
- Stack & retouch linear RGB
- 16-bit linear DNG
- Develop in RAW editor
White balance, exposure, and highlights stay editable on the finished stack.
Retouching a RAW stack paints directly from the aligned linear source frames, so painted areas keep the same RAW headroom in the exported DNG.
What it reads
JPEG, PNG, TIFF (8 or 16 bits per channel), DNG, and the camera RAW formats below, which LibRaw reads. Whether a particular camera's files are supported is in LibRaw's list of cameras. HEIC files open on iPhone and iPad only.
Transparency isn't used. A frame whose transparent part is only a border, as an aligned export leaves, is stacked inside that border; any other transparency is flattened onto white as the frame is read, and the stack's notice says so. Results never have an alpha channel.
| Maker | Extensions |
|---|---|
| Canon | .cr3, .cr2, .crw |
| Nikon | .nef, .nrw |
| Sony | .arw, .srf, .sr2 |
| Fujifilm | .raf |
| Olympus, OM System | .orf |
| Panasonic, Leica | .rw2, .raw, .rwl |
| Pentax | .pef |
| Samsung | .srw |
| Sigma | .x3f |
| Hasselblad, Phase One, Mamiya, Leaf | .3fr, .iiq, .mef, .mos |
| Kodak, Minolta, Epson | .dcr, .kdc, .mrw, .erf |
| Any (Leica, Pentax, Ricoh, phones, converted files) | .dng |
A stack is either all RAW and DNG files or all JPEG, PNG and TIFF; the app refuses a stack that mixes the two, because linear frames and finished pictures don't match.
Which decoder, when
DNG files are always read with the Adobe DNG SDK, the library Adobe publishes for DNGs, on macOS, Windows and Linux, using the color profile stored in the file. For other camera RAW files there are two decoders:
- LibRaw, built into the app and the command line. For color it uses an Adobe camera profile for the camera if one is installed: Adobe Standard by default, or Camera Standard, the camera maker's look. Deptheos doesn't include any; Lightroom, Camera Raw and Adobe DNG Converter install them. Without one, LibRaw's own color matrices are used.
- Adobe DNG Converter, a free program from Adobe for macOS and Windows that you install separately. It turns each RAW file into a temporary DNG, which the DNG SDK reads, so the frames get Adobe's own demosaic and color profile, as Lightroom and Camera Raw give the same files.
The app's default is Automatic: the converter when it is installed, LibRaw when it is
not. The two decoders crop and demosaic differently, so their frames of the same shot don't line up
pixel for pixel, and a stack uses one throughout. The command line uses LibRaw unless given
--raw-backend adobe-dng.
| If you want | Use | Why |
|---|---|---|
| Frames as Lightroom or Camera Raw would show them | Adobe DNG Converter | Adobe's demosaic and color profile, the same as those editors give the original files. |
| To start stacking at once, without temporary files | LibRaw | No conversion step and nothing extra on disk. With an Adobe profile installed, the colors are Adobe's, though the demosaic is LibRaw's. |
| To stack without installing anything else, or on Linux | LibRaw | It is built in; Automatic uses it when the converter is not installed. |
The settings
RAW decoder, under Alignment in the inspector, changes the decoder for one stack; it appears when the stack holds camera RAW files and Adobe DNG Converter is installed, since otherwise there is nothing to choose. Settings ▸ RAW holds:
- Default RAW decoder: Automatic, LibRaw or Adobe DNG Converter, for new stacks and for batches.
- Camera profile: the installed Adobe profile that colors LibRaw's frames: Adobe Standard, Camera Standard, or None (the colors in the file). DNGs and converted frames always use their own. Each render records the one it used.
- Camera profile folders: more places to look for
.dcpprofiles, searched before Adobe's folders. A profile is used when its file name starts with the camera's make and model.
Settings ▸ RAW, under Adobe DNG Converter, holds:
- Converter: where the converter is, if it isn't in its default location.
- Parallel conversions: how many files convert at once.
- Uncompressed conversions: the temporary DNGs are written without compression, so the stack runs about a quarter faster, but each takes twice the disk (about 270 MB for a 45 MP frame instead of 130 MB). They are kept until the stack has read them for the last time, which for Depth is its second pass, so a large stack needs tens of gigabytes free.
Converted files are kept in a cache for a while, so going back to a recent stack, or painting from its frames, doesn't convert them again.
What a DNG result keeps, and what it gives up
A RAW or DNG stack can be exported as a 16-bit linear DNG, with the color profile, white balance and camera and lens details of the frame the others were aligned to. Lightroom, Camera Raw and other RAW editors open it as a RAW file. It keeps:
- Linear values at 16 bits, so exposure, highlights and shadows can be pulled much further than in a JPEG.
- White balance as a setting. None was applied to the pixels, so the editor sets it as it would for an original frame.
- The camera's color profile, so colors match the original frames, and the editor can switch to another profile for the camera.
- The camera and lens details, which editors use to pick a lens profile for distortion and vignetting. The GPS position is left out.
It differs from the camera's own RAW files in these ways:
- The demosaic is done. Aligning frames requires shifting, rotating, and scaling RGB pixels, so the sensor's mosaic is demosaiced before stacking. Because the result already has three colors per pixel, an editor can't demosaic it again its own way, and features that need the raw mosaic, such as Lightroom's Raw Details, aren't offered. Lightroom's Denoise does work on it (Adobe's list).
- One frame's settings stand for the stack. The profile and white balance are those of the frame the others were aligned to, which matters only if the frames weren't shot alike.
- Adobe's distortion correction lands slightly off. Adobe DNG Converter stores the lens's distortion correction as an instruction for the editor, and the result carries it over, but the crop to the aligned area moves the picture's center, so the correction is applied around a slightly different point. Lightroom's own lens profile, chosen from the lens name the result keeps, is unaffected.
- Bigger files. Three values per pixel where a RAW file holds one, so the result is larger than one of the camera's files.
Keep the original RAW files for anything that needs the sensor's mosaic. A RAW stack can also be exported as 16-bit TIFF or PNG, or as JPEG, rendered to sRGB with the same profile and white balance, which is also how the app shows it on screen.
Color for JPEG, PNG and TIFF
JPEG, PNG and TIFF frames are stacked on their stored values, so the result is in the color space the frames were saved in. An embedded RGB ICC profile, such as Display P3 or Adobe RGB, is carried into the exports; an in-camera Adobe RGB JPEG, which names its color space in its EXIF rather than embedding a profile, is tagged Adobe RGB. Frames with neither are taken as sRGB. These stacks have no camera color profile to save, so they export as TIFF, PNG or JPEG, not DNG.
iPhone and iPad
The iPhone and iPad app has no Adobe DNG Converter, and offers two RAW decoders, chosen for each stack under RAW Decoder in Stack Settings: Apple, the default, and LibRaw. LibRaw (built in) keeps camera RAW files linear so the result can be exported as a 16-bit linear DNG, while Apple decodes them with Core Image to 16-bit sRGB with the camera's white balance and Apple's tone curve (exporting as TIFF, PNG, or JPEG). DNG files, including RAW captures from the app's own camera, stay linear and can be saved as DNG.
Under the hood
Every RAW or DNG frame becomes 16-bit linear camera RGB: demosaiced, scaled from the sensor's black level to its white level, turned upright, with no white balance, tone curve or gamma applied. A DNG that still holds the sensor's mosaic has its color profile read by the DNG SDK and is demosaiced by LibRaw on the desktop, by the SDK itself on iPhone and iPad.
Sharpness is always judged on a gamma-encoded copy of each frame, since on linear values bright areas would count for far more than dark ones. The pyramid also mixes its levels of detail on gamma-encoded values and converts the result back to linear; Depth mixes the linear values directly; the wavelet method picks detail on a gamma-encoded gray copy and takes each pixel's color from one linear frame. All three compute in 32-bit floating point and round to 16 bits once, at the end, so a DNG result of any method is linear.
Conversion is the cost of Adobe's demosaic. On an Apple M5 Max (32-core GPU), converting the 200 CR3 files of a circuit-board stack (45 MP each) took 74 s and 54 GB of disk, uncompressed. Stacking them with the pyramid then took 29 ms a frame, about as long as the same shots as JPEGs (26 ms), so nearly all of the cost is the conversion. LibRaw decodes as it stacks: the same CR3 files took 171 ms a frame, decoding included, with no files written.