Skip to main content

Module gamma

Module gamma 

Source
Expand description

Gamma correction functions and lookup tables.

Port of agg_gamma_functions.h and agg_gamma_lut.h — various gamma correction strategies used throughout AGG for anti-aliasing quality.

Structs§

GammaLinear
Linear ramp gamma: 0 below start, 1 above end, linear between. Port of C++ gamma_linear.
GammaLut
Gamma correction using pre-computed lookup tables. Port of C++ gamma_lut<LoResT, HiResT, GammaShift, HiResShift>.
GammaMultiply
Multiplicative gamma: min(x * multiplier, 1.0). Port of C++ gamma_multiply.
GammaNone
No gamma correction — returns input unchanged. Port of C++ gamma_none.
GammaPower
Power-law gamma correction: x^gamma. Port of C++ gamma_power.
GammaSpline
Spline-based gamma correction curve.
GammaThreshold
Threshold gamma: returns 0 if x < threshold, 1 otherwise. Port of C++ gamma_threshold.

Traits§

GammaFunction
Trait for gamma correction functions. Port of C++ gamma function objects (operator() overload).

Functions§

linear_to_srgb
Convert linear value (0..1) to sRGB.
srgb_to_linear
Convert sRGB value (0..1) to linear.