photomopOpen the studio

Colour

Gamma

Also called gamma correction, transfer function or gamma 2.2. Here is what it means, when it changes what you export, and what people get wrong.

ColourRuns on your deviceUpdated 10 August 2026

The short answer

Gamma is the non-linear relationship between the numbers stored in an image and the amount of light a display emits. Encoding images this way matches how human vision works, spending more of the available values in the darker tones where the eye notices small differences most.

Updated

The short version

Gamma at a glance

Quick facts about Gamma: what it describes, srgb curve, why it exists, editor equivalent, hdr alternatives
Quick factDetail
What it describesStored value to emitted light, non-linearly
sRGB curvePiecewise, approximating gamma 2.2
Why it existsHuman brightness perception is non-linear
Editor equivalentThe midtone slider in Levels
HDR alternativesPQ and HLG transfer functions

Slide the table sideways to see every column.

Why not just store brightness directly?

Because human brightness perception is not proportional to light. Double the photons and the scene looks somewhat brighter, not twice as bright, and the eye is far more sensitive to a small change in a dark tone than to the same absolute change in a bright one.

If you stored 8-bit values linearly, the shadows would get far too few steps and would break into visible bands, while the highlights would waste levels the eye cannot tell apart. Gamma encoding redistributes the same 256 steps so they land where perception can use them. That is why 8-bit images look smooth at all.

Is sRGB gamma really 2.2?

Approximately, but not exactly. The sRGB transfer function is piecewise: a short straight-line segment near black, then a power segment using an exponent of 1/2.4 with a small offset. Together they approximate an overall gamma of about 2.2, and the linear toe exists to avoid an infinite slope at zero, which would be awkward for both maths and noise.

So treating sRGB as a pure 2.2 power function is a working approximation. It is close enough for rough reasoning and wrong enough to cause visible errors in the deepest shadows if you build a conversion on it.

What breaks when you blend in gamma-encoded values?

Anything that averages pixels. Light adds linearly, but gamma-encoded numbers do not, so averaging two encoded values gives a result darker than the physically correct blend.

You see it most clearly in three places:

  • Cut-out edges. Semi-transparent edge pixels are blends of the subject and the new background. Composite them in gamma space and you get a dark fringe tracing the outline, most obvious on light subjects dropped onto white.
  • Downscaling. Resizing bright fine detail, such as a highlight on chrome or thin white text, dims it, because the resampling averages encoded values.
  • Blur and glow. Soft light effects lose energy and look muddy rather than luminous.

Good software linearises before the operation and re-encodes afterwards. If your tool offers a setting called something like blend in linear space or gamma-correct resampling, that is what it is doing.

What does the gamma slider in an editor do?

It moves the midtones without touching the black and white ends. The middle slider in a Levels dialog is a gamma control: pull it one way and the picture opens up in the shadows, pull it the other and it deepens, while pure black stays black and pure white stays white.

That makes it a gentler tool than brightness, which shifts everything and clips the ends. It is not free, though. Lifting shadows hard with gamma stretches a small number of levels over a wider range, and in an 8-bit file that shows up as banding and amplified noise. Do heavy tonal work on a 16-bit master where the levels exist to spend.

What people get wrong about gamma

Each one is a real failure mode, not a style preference.

  1. Compositing a cut-out onto a new background without linearising first, which leaves a dark fringe along the edge.

  2. Treating the sRGB curve as a pure 2.2 power function in a conversion, which shifts the deepest shadows.

  3. Pushing the midtone slider hard on an 8-bit JPEG, which stretches too few levels and produces banding in skies and gradients.

  4. Confusing display gamma with image gamma, when one is a property of the screen and the other is baked into the file.

Questions people ask

Gamma, answered

The follow-up questions people search for once they have the definition.

Why do cut-out edges get a dark outline when I change the background?

Because the partly transparent edge pixels were blended using gamma-encoded values instead of linear light, which makes the mid-blend darker than it should be. Software that composites in linear space avoids it. Where you cannot control that, a slight edge feather or a one-pixel edge shift usually hides the fringe.

Does gamma affect file size?

Indirectly and helpfully. Gamma encoding lets 8 bits per channel look smooth to the eye, so images can be stored at that depth rather than needing more bits. A linearly encoded image would need considerably more precision to avoid visible banding in shadows.

What is the difference between gamma and contrast?

Gamma reshapes the midtones while leaving black and white fixed. Contrast stretches the tonal range as a whole, pushing dark tones darker and light tones lighter, and it can clip both ends. Gamma is the more surgical of the two for opening up shadows.

Do HDR images use gamma?

Not the sRGB curve. HDR content uses different transfer functions, typically PQ or HLG, which are designed for much higher peak brightness and are defined in absolute or scene-referred terms rather than relative to a display's maximum.

From the studio

Tools that do this

Each one runs on your own device, so the photo stays where it is.

Sources

Where the facts on this page come from. Every link opens the specification, standard or documentation the claim was read at.

Now do it to a photo

Photomop is a photo studio that runs on your own device. Resize, crop, compress, convert, batch edit, remove a background and change one all work in the browser tab you are reading this in, at full resolution and with no watermark. The on-device page shows you how to check that the photo stays put.