Film negative to positive conversion tool in Rust. Processes scanned negatives (color/B&W) with film-specific corrections, tone curves, and color matrices.
- You should always invoke the Context7 tools for acquiring docs on crates, shaders, and other libraries.
- invers-core: Processing pipeline, decoders (TIFF/PNG/RAW), exporters, models, auto-adjustments
- invers-cli: CLI with clap - commands: convert, analyze, batch, init
- invers-raw: LibRaw bindings for RAW file decoding
cargo build --release --features gpu # Build with GPU acceleration
cargo test --features gpu # Run tests (includes CPU/GPU parity)
cargo fmt && cargo clippy # Format and lint
./target/release/invers convert <file> # Convert a negativePipeline stages (crates/invers-core/src/pipeline/mod.rs):
- Decode → Base Estimation → Inversion → Shadow Lift → Highlight Compression
- Auto Adjustments → Tone Mapping → Color Correction → Export
All processing uses f32 linear RGB (0.0-1.0 range).
Pipeline changes MUST be implemented in both CPU and GPU codepaths.
| Component | CPU | GPU |
|---|---|---|
| Pipeline | pipeline/mod.rs |
gpu/pipeline/mod.rs |
| Shaders | N/A | gpu/shaders/*.wgsl |
When modifying pipeline logic:
- Update CPU implementation
- Update corresponding GPU shader(s)
- Run
cargo test --features gputo verify parity
crates/invers-core/src/pipeline/- CPU processing pipeline (base_estimation/, inversion/, tone_mapping/)crates/invers-core/src/gpu/- GPU acceleration (context/, pipeline/, shaders/)crates/invers-core/src/models/- Data structures (cb/, convert_options/, scan_profile/)crates/invers-core/src/auto_adjust/- Auto-adjustments (levels/, white_balance/, color.rs, exposure.rs)crates/invers-core/src/decoders/- Image decoders (tiff.rs, png.rs, raw.rs)crates/invers-core/src/color/- Color space conversions (hsl.rs, lab.rs)crates/invers-cli/src/commands/- CLI command implementationsconfig/pipeline_defaults.yml- Default pipeline configuration