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:
commit
2a5930ca1e
@ -269,10 +269,10 @@ fn apply_image_parameters(lr: *mut libraw_data_t, args: &Args) {
|
|||||||
libraw_set_bright(lr, args.exposure);
|
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() {
|
if args.contrast != 0 && !lr.is_null() {
|
||||||
let value = args.contrast.min(100).max(-100) as c_int;
|
let value = args.contrast.min(100).max(-100) as f32 / 100.0 * 100.0;
|
||||||
libraw_set_highlight(lr, value);
|
libraw_set_bright(lr, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply highlights adjustment
|
// Apply highlights adjustment
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user