Files
DarkRoom/core/dr-export/Cargo.toml
dtourolle acab0d7abb A linear DNG in and out: the writer, and a three-sample RawImage
dr-export gains write_linear_dng — LinearRaw, DNG 1.4, u16 samples at
the sensor's scale, the body's matrices with their illuminants, the
as-shot neutral, the EXIF block an export writes — streamed strip by
strip through a closure so the composite is never held (FR-MRG-11). The
tiff crate's directory is a map, so PhotometricInterpretation is written
over what new_image set, which is the trick the S15.1 spike thought it
had to hand-roll around. The test reads the file back through rawler.

dr-decode's RawImage carries samples_per_pixel (a linear DNG is 3), the
body's profile with its calibrations mapped back to EXIF illuminant
codes, and the cleaned make and model. The GPU uploads a three-sample
image as it is, normalised by black and white like a photosite, through
a full f16 conversion — subnormals kept, because a 14-bit LSB sits at
f16's smallest normal and rounding it to zero would crush exactly the
shadows the file was written to keep.
2026-09-19 15:24:12 +02:00

45 lines
1.8 KiB
TOML

[package]
name = "dr-export"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
# No platform dependency and no filesystem, deliberately. This crate turns a
# rendered frame into *bytes* and a *name*; where those bytes go is the
# caller's problem, because the answer differs by more than a path. On Linux
# it is a file, on Android a SAF document descriptor with no path at all
# (ARCH §6.9), and on either it may be a `PUT` to the server. A crate that
# took a `Path` would work on exactly one of the three.
[dependencies]
dr-types.workspace = true
log.workspace = true
thiserror.workspace = true
# Encoders. All three are pure Rust and already in the tree, which is the same
# criterion that chose rustls, bundled SQLite and the Lensfun port: a C
# dependency here would be one more thing to satisfy under the Android NDK.
#
# AVIF and JPEG XL (FR-EXP-1) are deliberately absent. The mature encoders for
# both are C or C++ — libaom and libjxl — and ravif, the pure-Rust AVIF path,
# is slow enough to change what a batch export feels like. Neither belongs in
# the first version; see `format` in lib.rs for what happens when one is asked
# for.
jpeg-encoder.workspace = true
png = "0.18"
tiff = "0.11"
# The example runs the whole path — decode, GPU render, read back, encode,
# write — so it needs what the library deliberately does not: a GPU, a
# pipeline and a decoder. Dev-only, so none of it reaches a dependent.
[dev-dependencies]
dr-decode.workspace = true
dr-gpu.workspace = true
dr-pipeline.workspace = true
env_logger.workspace = true
pollster.workspace = true
# The DNG writer's test reads its output back through the decoder the
# library uses, which is the whole claim the writer makes (S15.1).
rawler.workspace = true
zune-jpeg.workspace = true