From 929b5dcba59fc9be98869bc84c27b5c4e3f411e3 Mon Sep 17 00:00:00 2001 From: opencode Date: Sun, 5 Jul 2026 14:48:38 +0000 Subject: [PATCH] fix(#5): contrast uses libraw_set_bright instead of libraw_set_highlight --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 761d8b1..24d5793 100644 --- a/src/main.rs +++ b/src/main.rs @@ -269,10 +269,10 @@ fn apply_image_parameters(lr: *mut libraw_data_t, args: &Args) { libraw_set_bright(lr, args.exposure); } - // Apply contrast (using highlight parameters for demonstration) + // Apply contrast (map to brightness multiplier for tonal range) if args.contrast != 0 && !lr.is_null() { - let value = args.contrast.min(100).max(-100) as c_int; - libraw_set_highlight(lr, value); + let value = args.contrast.min(100).max(-100) as f32 / 100.0 * 100.0; + libraw_set_bright(lr, value); } // Apply highlights adjustment