Merge pull request 'fix(#5): contrast uses libraw_set_bright instead of libraw_set_highlight' (#21) from fix/issue-5 into master

This commit is contained in:
jarianc 2026-07-05 09:48:45 -05:00
commit 2a5930ca1e

View File

@ -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