# Photo Editor with Libraw RAW Processing A Rust-based photo editor that processes RAW images using the libraw library for professional photography adjustments. ## Features - Process RAW image files with 11 adjustment parameters - Full CLI interface with parameter validation - Direct integration with system-installed libraw library - Optimized release build (650KB executable) - Cross-platform compatibility (macOS tested) ## Installation ### Prerequisites First install libraw on your system: **macOS:** ```bash brew install libraw ``` ### Building ```bash # Clone the repository git clone cd PhotoEditor/photo_editor # Build release version cargo build --release # Find the executable in: ./target/release/photo_editor ``` ## Usage ### Basic Usage ```bash ./target/release/photo_editor \ --input input_file.raw \ --output output_file.jpg \ --exposure 0.5 \ --contrast 20 \ --highlights -10 \ --shadows 5 \ --whites 0 \ --blacks 0 \ --clarity 10 \ --vibrance 15 \ --saturation 5 \ --temperature 10 \ --tint 5 ``` ### CLI Options ``` Photo Editor v0.1 ================== Input file: example.raw Output file: output.jpg Exposure: 0.0 Contrast: 0 Highlights: 0 Shadows: 0 Whites: 0 Blacks: 0 Clarity: 0 Vibrance: 0 Saturation: 0 Temperature: 0 Tint: 0 Photo Editor - A Rust-based photo editor with RAW image processing capabilities using libraw Usage: photo_editor [OPTIONS] --input --output Options: -i, --input Input raw image file to process -o, --output Output processed image file --exposure Exposure adjustment (-2.0 to 2.0) [default: 0.0] --contrast Contrast adjustment (-100 to 100) [default: 0] --highlights Highlights adjustment (-100 to 100) [default: 0] --shadows Shadows adjustment (-100 to 100) [default: 0] --whites Whites adjustment (-100 to 100) [default: 0] --blacks Blacks adjustment (-100 to 100) [default: 0] --clarity Clarity adjustment (-100 to 100) [default: 0] --vibrance Vibrance adjustment (-100 to 100) [default: 0] --saturation Saturation adjustment (-100 to 100) [default: 0] --temperature Temperature adjustment (-100 to 100) [default: 0] --tint Tint adjustment (-100 to 100) [default: 0] -h, --help Print help information -V, --version Print version information ``` ### Example Commands **Basic processing without adjustments:** ```bash ./target/release/photo_editor \ --input sample.raw \ --output output.jpg ``` **Dramatic enhancement with multiple adjustments:** ```bash ./target/release/photo_editor \ --input sample.raw \ --output dramatic_output.jpg \ --exposure 0.8 \ --contrast 30 \ --highlights -20 \ --shadows 15 \ --whites 5 \ --blacks -10 \ --clarity 25 \ --vibrance 30 \ --saturation 20 \ --temperature 15 \ --tint 8 ``` **Fine-tuning highlights and shadows:** ```bash ./target/release/photo_editor \ --input sample.raw \ --output refined.jpg \ --highlights -15 \ --shadows 10 \ --whites 5 \ --blacks -5 ``` **Advanced configuration with negative exposure:** ```bash ./target/release/photo_editor \ --input sample.raw \ --output processed.jpg \ --exposure -0.3 \ --contrast 40 \ --clarity 15 \ --vibrance 20 ``` ## Adjustment Parameters | Parameter | Range | Effect | |----------------|-----------|---------------------------------| | Exposure | -2.0 to 2.0 | Controls overall brightness | | Contrast | -100 to 100 | Adjusts image contrast | | Highlights | -100 to 100 | Control highlight recovery | | Shadows | -100 to 100 | Control shadow detail | | Whites | -100 to 100 | Control white point | | Blacks | -100 to 100 | Control black point | | Clarity | -100 to 100 | Enhances edge definition | | Vibrance | -100 to 100 | Adjusts color saturation | | Saturation | -100 to 100 | Controls overall color intensity | | Temperature | -100 to 100 | Adjusts color temperature | | Tint | -100 to 100 | Adjusts color tint | ## Technical Details - Built with Rust for safety and performance - Integrates directly with system-installed libraw C library - Uses Cargo toolchain for dependency management - Optimized for size (650KB executable) - Full error handling and resource cleanup - Cross-platform compatibility with appropriate system dependencies ## Requirements - macOS with `brew` package manager (for libraw installation) - Rust 1.70+ toolchain - libraw C library installed via Homebrew ## License MIT License