Pure rust library for reading / writing DNG files providing access to the raw data in a zero-copy friendly way.

Related tags

Command-line dng-rs
Overview

DNG-rs   crates-shield docs-shield

A pure rust library for reading / writing DNG files providing access to the raw data in a zero-copy friendly way. Also containing code for reading / writing a human-readable YAML representation of DNG tags / the IFD structure. DNG-rs also supports interacting with DCP (Dng Camera Profile) files, but that is on a best-effort basis since I was unable to find official documentation on that.

Tools

This library also contains a pair of cli tools for converting a DNG into a human-readable YAML representation and back. These are kind of similar to dcpTool's -d and -c but use YAML rather than XML.

$ target/debug/dump_dng -h                                           
Dump the IFD metadata of a TIFF / DNG image to a human readable yaml representation

Usage: dump_dng [OPTIONS] <FILE>

Arguments:
  <FILE>  input file to get the metadata from

Options:
  -f, --dump-rational-as-float  convert Rational and SRational types to float for better readability (this is lossy)
  -e, --extract                 extract strips, tiles and larger blobs into a directory. also write the ifd chain as a yaml file there
  -h, --help                    Print help information
  -V, --version                 Print version information
$ target/debug/compile_dng -h 
Assemble a DNG file from some of other dng files, plain raw files and metadata

Usage: compile_dng [OPTIONS] --yaml <YAML>

Options:
      --yaml <YAML>  input YAML file to get the metadata from
      --dcp          
  -b, --big-endian   
  -h, --help         Print help information
  -V, --version      Print version information

example:

$ target/debug/dump_dng src/yaml/testdata/axiom_beta_simulated.dcp -f 
UniqueCameraModel: "AXIOM Beta"
ProfileName: "AXIOM Beta spectral simulated"
ProfileEmbedPolicy: allow copying
CalibrationIlluminant1: StandardIlluminantA
ColorMatrix1: [
  2.698, -1.8779, 0.3348,
  0.493, 0.0325, 0.2078,
  0.2645, -0.1286, 0.3895,
]
CalibrationIlluminant2: D65Illuminant
ColorMatrix2: [
  2.5136, -1.2873, -0.1654,
  0.2275, 0.5494, 0.0929,
  0.1393, 0.0697, 0.4617,
]

Current Status

This library should be in a usable state for many applications. However, a more high-level API is not implemented (yet?). For that (and support for other raw formats) you might want to use rawloader.

You might also like...
Use raw-window-handle 0.5 with crates that depend on 0.4.

OldHasRawWindowHandleWrapper Wrap any type that implements HasRawWindowHandle and HasRawDisplayHandle from raw-window-handle 0.5 in OldHasRawWindowHan

argmax is a library that allows Rust applications to avoid Argument list too long errors (E2BIG) by providing a std::process::Command wrapper with a

argmax argmax is a library that allows Rust applications to avoid Argument list too long errors (E2BIG) by providing a std::process::Command wrapper w

Rust library crate providing utility functions for diff and patch of slices

This crate provides the Change enum as an abstraction for diff::Result, lcs_diff::DiffResult, and wu_diff::DiffResult; the diff_changes(), diff_diff()

A library providing helpers for various StarkNet fees related tasks.
A library providing helpers for various StarkNet fees related tasks.

🐺 How Much ? 🦀 Table of Contents About Getting Started Prerequisites Installation Usage Estimate fees on network Authors & contributors Security Lic

Specification for a decomp settings file & library for providing settings to tools

Decomp Settings File There are a lot of decompilation tools. Common metadata like the location of the .map file and target file are often needed by th

A tool that makes writing WebAssembly Text files easier.

Silly WAT Linker SWL is a tool that makes writing WebAssembly Text files easier. It is future-proof and simple because it doesn’t actually understand

The dead easy way to use config files in your rust project

Configr The dead easy way to use config files in your project This will load a config.toml file if it exists, otherwise it will create the needed fold

Voila is a domain-specific language launched through CLI tool for operating with files and directories in massive amounts in a fast & reliable way.

Voila is a domain-specific language designed for doing complex operations to folders & files. It is based on a CLI tool, although you can write your V

A library to provide abstractions to access common utilities when developing Dioxus applications.

🧰 Dioxus Standard Library 🚀 A platform agnostic library for supercharging your productivity with Dioxus. dioxus-std is a Dioxus standard library tha

Owner
apertus° - open source cinema
Open Technology for Professional Film Production
apertus° - open source cinema
Raw C Shell: interact with your operating system using raw C code, because why not?

rcsh Raw C Shell is a minimalist shell with no built in commands. You write entirely in C code and use return; to execute your code. Unlike that silly

null 4 Feb 7, 2023
A crate to help you copy things into raw buffers without invoking spooky action at a distance (undefined behavior).

?? presser Utilities to help make copying data around into raw, possibly-uninitialized buffers easier and safer. presser can help you when copying dat

Embark 131 Mar 16, 2023
Reading Getting Friendly With CPU Caches

Getting Friendly With CPU Caches Reading Getting Friendly With CPU Caches, by Miki Tebeka and William Kennedy, inspired me to look at some Rust equiva

Herbert 6 Jul 25, 2023
A new pure-Rust library for cross-platform low-level access to USB devices.

nusb A new pure-Rust library for cross-platform low-level access to USB devices. Documentation Compared to rusb and libusb Pure Rust, no dependency on

Kevin Mehall 23 Oct 30, 2023
😎 Pretty way of writing regular expressions in Rust

?? Write readable regular expressions The crate provides a clean and readable way of writing your regex in the Rust programming language: Without pret

Adi Salimgereyev 7 Aug 12, 2023
A zero-dependency crate for writing repetitive code easier and faster.

akin A zero-dependency crate for writing repetitive code easier and faster. Check Syntax for information about how to use it. Why? Example Syntax NONE

LyonSyonII 36 Dec 29, 2022
Copy files from Git repository to local.

gitcp Copy files from Git repository to local. Install We are planning to add some installers support in the future. e.g. homebrew winget debian packa

Ryo Nakamura 3 Aug 9, 2022
A rust crate to view a structure as raw bytes (&[u8])

rawbytes A Rust crate to view a structure as a plain byte array (&[u8]). Super simple. Tiny. Zero dependencies. This is a safer interface to slice::fr

Frank Denis 4 Sep 7, 2023
A raw implementation of Interoperable Private Attribution

Raw IPA A collaborative effort to generate a raw, but broadly functional, prototype of the Interoperable Private Attribution (IPA) proposal. The goal

Martin Thomson 1 Dec 12, 2022
Unopinionated low level API bindings focused on soundness, safety, and stronger types over raw FFI.

?? firehazard ?? Create a fire hazard by locking down your (Microsoft) Windows so nobody can escape (your security sandbox.) Unopinionated low level A

null 5 Nov 17, 2022