gammaEncode
gammaEncode is a technique used in computer graphics and image processing to prepare image data for display on devices with non-linear responses. Most display devices, such as monitors and televisions, do not accurately represent brightness linearly. Instead, they exhibit a gamma curve, meaning that a change in input signal does not result in a proportional change in output brightness.
Gamma encoding is the process of applying a mathematical function, typically a power-law function, to the pixel
Without gamma encoding, images would appear darker or washed out depending on the display's gamma. For example,
In practice, images are often stored in a gamma-corrected space (e.g., sRGB, which has an approximate gamma