Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

dnglab

> 数据库
Open source

Camera RAW to DNG file format converter

646 stars0 likes1 views
WebsiteGitHub

About

Camera RAW to DNG file format converter

DNGLab - A 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.

Installation

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.

Build from source

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:

bash
git clone https://github.com/dnglab/dnglab.git
cd dnglab
cargo build --release

The dnglab binary is found at ./target/release/dnglab.

Examples

Convert a single file:

dnglab convert IMG_1234.CR3 IMG_1234.DNG

Convert whole directory:

dnglab convert ~/DCIM/100EOS ~/filmrolls/photos-france

Supported cameras and file formats

For a list of supported cameras please see SUPPORTED_CAMERAS.md.

Supported raw file formats

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

Supported DNG features

  • DNG lossless compression (LJPEG-92)

Command line help

convert subcommand

…

`

analyze subcommand

…

`

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:

bash
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:

json
{
  "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
}

extract subcommand

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

makedng subcommand

…

`

Contribute samples

Please see our guide: CONTRIBUTE_SAMPLES.md.

A note about processing of untrusted files

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.

A note on AI-assisted contributions

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.

FAQ

Why a DNG tool if there is already something from Adobe?

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.

Why should I use DNG instead of RAW?

Never ask. If you need DNG you will know.

Will camera/format (...) be added?

Well, depends on developer resources.

Is a GUI in planning?

Yes, DNGLab should get a GUI in near future.

How can I donate to this project?

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.

Credits

Special thanks goes to:

  • Darktable developer team www.darktable.org
  • Laurent Clévy CR3 documentation
  • Kostya Shishkov
  • Hubert Kowalski
  • Rawloader development team rawloader
  • All volunteers who have contributed samples.

Without the support and engagement from these people the development of dnglab would not have been possible.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustconverterdngdng-formatphotography

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库