tools / images / image levels

Image levels

Apply a reproducible, versionable JSON tone recipe (levels/curves) to images in batch.
Runs locally in your browser. Enable JavaScript to use the interactive tool. The practical details remain available below.

What Image levels actually does

A scan or a phone photograph that looks washed out is usually not underexposed; it is a picture whose darkest pixel is not black and whose lightest is not white, so the whole range is squeezed into the middle. Moving the black point and the white point to where the picture's actual range begins and ends puts the contrast back without inventing anything, and gamma then decides where the middle of that range sits, which is the control that lifts shadows without blowing out a sky. Brightness and contrast are the blunt instruments and they are here too. The part that matters for a batch is that these five numbers are a recipe rather than a gesture: the same five values applied to two hundred frames from the same shoot produce a consistent set, which is what dragging a slider per image cannot do. The recipe saves to a small JSON file, and that file is exactly what the command line tool writes and reads, down to the bytes, so a correction decided in the tab can be handed to a script, a colleague, or a machine that has never seen this page. The original stays on the stage next to the result while the numbers are being chosen, and nothing is uploaded.

How to use it

  • Drop one photograph or the whole shoot. Everything is decoded in this tab.
  • Move the black point up to where the picture's dark values really start and the white point down to where its light values end. The result on the stage updates as you go.
  • Set the gamma above one to lift the midtones or below one to hold them down, then use brightness and contrast only if the picture still needs them.
  • Compare against the original with the view control, because a correction that looks right on its own often turns out to be too strong beside the source.
  • Save the recipe when the numbers are right, then apply the batch. The saved file can be handed to the command line tool for the rest of the archive.

Useful for

  • Bring back a flat scan of a print or a document, where the whole tonal range sits between two grays.
  • Apply one correction consistently across every frame of a shoot rather than judging each one separately.
  • Agree a correction with someone else by sending them the recipe file rather than the adjusted images.
  • Decide a correction in the browser and run it over thousands of files later with the command line tool, from the same recipe.

Limits worth knowing

  • The five controls are global. There are no per channel curves and no selective adjustments, so a color cast is not what this fixes.
  • Contrast is measured against the mean brightness of the whole image, the way the reference implementation measures it, so a picture that is mostly sky behaves differently from one that is mostly ground.
  • The browser converts an image to sRGB when it decodes it, so a color profile in the source is applied and not carried into the output. The command line tool carries the profile through instead.
  • JPEG output is re-encoded at the quality you set, so repeated rounds through the tool accumulate loss. Work from the original rather than from a previous export.

Questions people ask

undefined

undefined

undefined

undefined

undefined

undefined

undefined

undefined