Linear vs Gamma Blur Precision in GIMP

When applying blur filters in GIMP, the choice between Linear Light and Gamma-corrected precision fundamentally changes how colors blend and how light is distributed. Gamma-corrected mode processes pixel math using non-linear values designed to match human eye perception, while Linear Light mode processes pixel values according to the physical behavior of light. This technical distinction significantly impacts edge transitions, the brightness of blurred highlights, and overall color fidelity.

The Mathematical Difference

Digital images are typically stored with a gamma curve applied (such as sRGB) to compress luminance data efficiently for displays.

  • Gamma-Corrected Mode (Non-linear): The blur algorithm calculates the average of pixel values directly on the encoded numbers. Because gamma-encoded values do not scale linearly with physical photon emission, averaging two values produces an incorrect mathematical result in terms of actual light energy.
  • Linear Light Mode: GIMP first converts the gamma-encoded values back into raw physical light values, calculates the blur across neighboring pixels, and then converts the result back for display. The math reflects how real-world optics blend light photons.

Impact on Edge Transitions and Dark Halos

The most noticeable functional difference appears at high-contrast edges, such as white text on a black background or adjacent complementary colors (like red and cyan):

  • Gamma-Corrected Blur: When blending opposing bright and dark pixels, the non-linear math produces an average that is physically darker than it should be. This creates an unnatural, muddy, dark halo or gray fringing along the boundary between the colors.
  • Linear Light Blur: Colors transition smoothly without darkening. Because the physical light levels are preserved during the calculation, there are no dark fringe artifacts, resulting in clean, natural color mixing.

Highlight Preservation and Bokeh Appearance

Linear Light and Gamma modes treat highlights and points of light differently during diffusion:

  • Gamma-Corrected Blur: Bright elements lose their intensity quickly. A bright point of light spreads evenly into the surrounding area, causing highlights to look flat, dim, and chalky.
  • Linear Light Blur: Mimics optical lens characteristics. Bright highlights expand aggressively into neighboring dark regions, creating a natural glowing bloom or realistic photographic bokeh. The overall perceived exposure of the blurred region remains physically accurate.

Summary of Best Uses

  • Use Linear Light for photographic adjustments, lens blur simulations, glowing effects, and realistic depth-of-field manipulation where optical realism and highlight preservation are critical.
  • Use Gamma-corrected mode when working on graphic design assets where maintaining uniform geometric edge width is preferred over optical realism, or when working strictly within legacy workflows that rely on standard sRGB math.