A camera RAW image preprocessor and importer written in Rust.
Rawbit processes raw image files by converting them to the DNG format in parallel, while offering the ability to manipulate metadata and customize file name formatting.
- RAW Image Conversion: Converts camera RAW files to DNG format.
- Flexible Input/Output:
- Process single files or entire directories.
- Define output directories with optional overwrite support.
- Custom Filename Formatting: Supports user-defined naming conventions for output files.
- Metadata Handling: Supports EXIF metadata manipulation
- Multi-Threaded Processing: Leverages multiple CPU cores for parallel image processing.
all written in Rust, btw...
I plan on making binary releases available for all major platforms via package managers, but in the meantime, you'll need to have the Rust toolchain installed:
- Install Rust and ensure
cargo
is available. - Install via cargo:
cargo install rawbit
rawbit --out-dir "./dng" --format "%Y-%m-%d_%H-%M-%S_{image.original_filename}" ./raw/ABC1234.ARW
# or
rawbit -o"./dng" -F"%Y-%m-%d_%H-%M-%S_{image.original_filename}" ./raw/ABC1234.ARW
rawbit --in-dir "./raw" --out-dir "./dng" --format "%Y-%m-%d_{camera.model}_{lens.model}_{image.original_filename}"
# or
rawbit -i"./raw" -o"./dng" -F"%Y-%m-%d_{camera.model}_{lens.model}_{image.original_filename}"
rawbit [OPTIONS] --out-dir <DIR> <--in-dir <DIR>|FILES>
Arguments: [FILES]... individual files to convert
Options: -i, --in-dir <DIR> directory containing raw files to convert -o, --out-dir <DIR> directory to write converted DNGs -F, --format <FORMAT> filename format of converted DNGs; see https://docs.rs/rawbit for info on syntax -a, --artist <ARTIST> value of the "artist" field in converted DNGs --embed-original embed the original raw image in the converted DNG NOTE: conversion may take considerably longer -j, --n-threads <N> number of threads to use while processing input images, defaults to number of CPUs -q, --quiet quiet output, only emit critical errors -v... increase log verbosity; specify multiple times to increase verbosity -f, --force overwrite existing files, if they exist -h, --help Print help -V, --version Print version
This is the distinguishing feature of rawbit
.
You can insert the date-time information read from the RAW image's metadata using
syntax similar to libc's strftime
.
More information can be found here
Similar to the date/time interpolation, some well-known names in between squirly braces (i.e. "{...}") expands into image-specific EXIF metadata in the filename:
Variable | Description | Example |
---|---|---|
camera.make |
Camera make | |
camera.model |
Camera model | |
camera.shutter_speed |
Shutter speed used to take the image | |
camera.iso |
Sensor sensitivity (ISO) used to take the image | |
lens.make |
Lens make | |
lens.model |
Lens model | |
lens.f_stop |
Lens aperture F stop value use to take the image | |
image.original_filename |
Image's original filename. Automatically inserted if not specified in the original format string |
Note:
More metadata fields are a WIP, more to come soon...
Why not use dnglab
?
dnglab convert
is extremely versatile, but the inability to format the resulting
converted DNG filenames is a dealbreaker coming from using Lightroom RAW import
tooling.
rawbit
's superpower is the ability to inspect the metadata of the file being converted
into the filename of the converted DNG, making batch image processing that much easier
to manage without expensive and proprietary software.
rawbit
actually uses the same RAW image processing library that was created by
the maker of dnglab
, named rawler
.
I owe a huge thanks to the DNGLab team for their awesome work that made this project possible.
DNGLab/Rawler: Rust-native RAW image manipulation tools from the ground-up
rayon: For making fearless concurrency a peice of cake
Adam Perkowski: Contributing CI and package manager support