rawbit

Crates.iorawbit
lib.rsrawbit
version
sourcesrc
created_at2024-11-21 03:00:16.131246
updated_at2024-12-05 20:04:56.331454
descriptionA camera RAW image preprocessor and importer
homepage
repositoryhttps://github.com/cartercanedy/rawbit
max_upload_size
id1455638
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(cartercanedy)

documentation

README


rawbit

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.

Features

  • RAW Image Conversion: Converts camera RAW files to DNG format.
  • Flexible Input/Output:
    • Process individual 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...

Installation

I plan on making binary releases available for all major platforms via package managers. In the meantime, there are AUR & crates.io packages available:

Arch Linux

You can install rawbit with your preferred AUR helper. Example:

paru -S rawbit

Crates.io

  1. Install Rust and ensure cargo is available.
  2. Install via cargo:
cargo install rawbit

Examples

Convert a single file

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

Convert an entire directory

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

Usage

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

Filename formatting

This is the distinguishing feature of rawbit.

Date/time interpolation

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

Metadata interpolation

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 and robust, but my main motivation for developing rawbit was to enable a more flexible batch DNG conversion/import workflow with entirely free (as in freedom) software enabling it.

This project utilizes the same library that powers DNGLab, so I owe a huge thanks to the DNGLab/Rawler team for their awesome work that made this project possible.

Special thanks

DNGLab/Rawler: Rust-native RAW image manipulation tools from the ground-up
rayon/tokio: For making fearless concurrency a peice of cake
Adam Perkowski: Contributing CI and package manager support

Commit count: 60

cargo fmt