Skip to content

Commit

Permalink
Update color_correct.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmeft24 authored and jam1garner committed Apr 20, 2021
1 parent d5506ba commit fc8a700
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/color_correct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub fn color_correct(skin_data: &mut image::RgbaImage) {
let pixel = &mut channels[i];

// gamma brightening by a factor of 1.385, bounded to [0, 184]
*pixel = ((((*pixel as f64) / 255.0).powf(1.0f64 / 1.385f64) * 255.0) * 184.0 / 255.0) as u8;
*pixel = ((((*pixel as f64) / 255.0).powf(1.0f64 / 1.200f64) * 255.0) * 191.0 / 255.0) as u8;
}
}
}
Expand Down

0 comments on commit fc8a700

Please sign in to comment.