Module zune_imageprocs::gamma
source · Expand description
Apply gamma correction onto an image
This filter applies gamma correction on image pixels.
§Algorithm details
The formula used is
max_value = maximum byte value
max_value_inv = 1.0/max_value
gamma_value = passed gamma value
pixel = max_value_inv * pixel.powf(gamma_value);
§Implementation details
- For
u8
andu16
, we use lookup tables to improve speed - For
f32
naive execution is used
Structs§
- Gamma adjust an image