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