Camera RAW to DNG file format converter
Command line tool to convert camera RAW files to Digital Negative Format (DNG).
It is currently in alpha state, so don't expect a polished and bugfree application. Please report bugs in our issue tracker.
Rawler crate is now published to crates.io, but please notice that the API is not yet stable and thus rawler is not following SemVer.
There are pre-built binary packages for each release which can be downloaded from
the asset section under latest release.
The .deb packages are for Debian based systems (amd64 and arm64), which can be installed
with dpkg -i dnglab_x.x.x_amd64.deb. For non-Debian systems, you can use the single-binary file,
for example ./dnglab_linux_x64 convert IMG_1234.CR2 IMG_1234.dng.
Windows is not officially supported, but the release assets contains a dnglab-win-x64_vx.x.x.zip file with pre-built Windows binary. Please be aware that this build is untested.
Dnglab is written in Rust, so you can compile it by your own on your target machine. You need the Rust toolchain installed on your machine, see https://rustup.rs/ for that. Once the toolchain is installed, you can simply compile Dnglab with:
git clone https://github.com/dnglab/dnglab.git
cd dnglab
cargo build --releaseThe dnglab binary is found at ./target/release/dnglab.
Convert a single file:
dnglab convert IMG_1234.CR3 IMG_1234.DNGConvert whole directory:
dnglab convert ~/DCIM/100EOS ~/filmrolls/photos-franceFor a list of supported cameras please see SUPPORTED_CAMERAS.md.
| Manufacturer | Format | Supported | Remarks |
|---|---|---|---|
| ARRI | ARI | ✅ Yes | |
| Canon | CR3 | ✅ Yes | CR3_STATE.md |
| Canon | CR2 | ✅ Yes | |
| Canon | CRW | ✅ Yes | |
| Epson | ERF | ✅ Yes | |
| Fujifilm | RAF | ✅ Yes | |
| Hasselblad | 3FR | ✅ Yes | |
| Kodak | KDC | ✅ Yes | |
| Kodak | DCS | ✅ Yes | |
| Kodak | DCR | ✅ Yes | |
| Leaf | IIQ | ✅ Yes | |
| Leaf | MOS | ✅ Yes | |
| Mamiya | MEF | ✅ Yes | |
| Minolta | MRW | ✅ Yes | |
| Nikon | NEF | ✅ Yes | |
| Nikon | NRW | ✅ Yes | |
| Olympus | ORF | ✅ Yes | |
| Panasonic/Leica | RW2 | ✅ Yes | |
| Pentax/Ricoh | PEF | ✅ Yes | |
| Phase One | IIQ | ✅ Yes | |
| Samsung | SRW | ✅ Yes | |
| Sony | ARW | ✅ Yes | |
| Sony | SRF | ✅ Yes | |
| Sony | SR2 | ✅ Yes |
…`
…`
With analyze, you can get a full dump of the internal file structure as YAML or JSON. With JSON output, it's possible to filter and transform the data with jq. For example, to get the cfa_layout from the CMP1 box for CR3 files, you can write:
find /cr3samples/ -type f -name "*.CR3" -exec dnglab analyze --structure '{}' --json \; | \
jq ". | { file: .file.fileName, cfa_layout: .data.fileStructure.cr3.filebox.moov.trak[2].mdia.minf.stbl.stsd.craw.cfa_layout}"The output is:
{
"file": "Canon EOS 90D_CRAW_ISO_250_nocrop_nodual.CR3",
"cfa_layout": 1
}
{
"file": "Canon EOS 90D_CRAW_ISO_100_nocrop_nodual.CR3",
"cfa_layout": 1
}dnglab-extract
Extract embedded original Raw from DNG
USAGE:
dnglab extract [OPTIONS]
ARGS:
Input file
Input file or directory
Output file or existing directory
OPTIONS:
-d turns on debugging mode
-f, --override Override existing files
-h, --help Print help information
-r, --recursive Process input directory recursive
--skipchecks Skip integrity checks
-v Print more messages…`
Please see our guide: CONTRIBUTE_SAMPLES.md.
This project receives no support from camera manufacturers. Most of the development effort goes into understanding compression algorithms and file formats — largely through debugging.
Avoiding panics is generally good practice (e.g. using x.saturating_sub(y) instead of x - y). But a panic on x - y points directly at a misunderstanding of the algorithm (or a corrupt file), whereas the saturating variant silently hides it — so the panicking version is often far more useful. Because maintainable, debuggable code takes priority over panic-freedom here, PRs whose only purpose is to keep a fuzzer happy are unlikely to be merged.
If you need to process untrusted files in an environment that could be harmed by malformed input, or where panics/aborts are unacceptable, we recommend not using dnglab/rawler at all. Instead, ask your camera vendor for support, official libraries and documentation.
This project accepts contributions made with the help of AI. However, your PR description must clearly communicate that you fully understand the change, can answer questions about it, and are prepared to maintain the code in the future. When in doubt, it's very likely that your PR will be closed without further response.
The DNG converter from Adobe is free (at cost), but not free in terms of free software. Nobody can add or fix camera support except of Adobe. And it has no support for Linux. That's why I've started writing my own little DNG swiss army knife.
Never ask. If you need DNG you will know.
Well, depends on developer resources.
Yes, DNGLab should get a GUI in near future.
I don't have any sponsoring or donation account like Patreon or Paypal. If you want to surprise me, please have a look at my Amazon wish list.
Special thanks goes to:
Without the support and engagement from these people the development of dnglab would not have been possible.
No open issues yet, or sync has not completed.