Free

Free coded apps to suit all. No sign up, no email, usable offline, updates when I can, feedback welcome. Send feedback

How-to

How to correct lens distortion and vignetting

Fix barrel distortion, colour fringes, dark corners and leaning walls with Filter > Lens Correction in Paint by Zaweba, using your own lens profiles.

How to correct lens distortion and vignetting

Lens distortion and vignetting are both fixed in one window in Paint by Zaweba: open Filter > Lens Correction. It handles distortion, red/cyan, blue/yellow and green/magenta colour fringes, vignette amount and midpoint, and vertical and horizontal perspective, with a grid over the picture to judge straight lines. If you shoot with the same lens often, save or import a profile under Filter > Lens Profiles and it will be matched from the photo's EXIF data.

Every lens bends the picture a little. Wide angles bow straight lines outwards, zooms often pinch them inwards at the long end, and nearly all lenses darken the corners when used wide open. None of that is a fault in your photography, and it is quick to put right.

The controls, one at a time

Start with distortion. Turn on the grid and pick a line in the photo that you know is straight in real life, such as a horizon, a door frame or the edge of a table. Move the distortion slider until that line runs parallel to the grid. Bowed outwards is barrel distortion; pinched inwards is pincushion.

Next look at the colour fringes. Zoom in on a high contrast edge near a corner, a dark branch against a bright sky is ideal. If you see a red or cyan halo, use the red/cyan slider; a blue or yellow one uses blue/yellow; green and magenta has its own slider too. Move each until the edge looks neutral.

Then the vignette. The amount slider brightens or darkens the corners, and the midpoint decides how far in from the edges the change reaches. A low midpoint keeps the change tight to the corners, which is usually what a lens vignette looks like.

Finally perspective, angle and scale. Vertical perspective straightens buildings that lean back when you point the camera upwards. Horizontal perspective squares up a wall shot slightly from the side. Angle levels a tilted horizon. Correcting perspective pulls the corners in, so use scale to fill the frame again, and the edge setting to decide what happens at the borders.

Using lens profiles

Paint doesn't ship with a database of lenses built in. Instead you can save the settings you've worked out for your own lens as a profile, or import lensfun XML profiles, which are a widely used open collection of lens measurements. Profiles live under Filter > Lens Profiles and are matched by the lens name and focal length recorded in the photo's EXIF data, so the right correction comes up for each shot.

This is worth ten minutes of setting up if you use one or two lenses most of the time. Photograph a brick wall or a sheet of graph paper at a few focal lengths, correct each one by eye, and save them. From then on the starting point is right for every photo from that lens.

Correcting a whole shoot at once

Lens Correction can run in a batch from its recorded settings. Record it in an action, then run Batch over a folder, and every picture gets the same correction. That suits a set of property photos taken with one wide lens, or a product shoot where the camera never moved. Batch writes a batch-log.txt so you can see what happened to each file.

When to apply it

Do lens correction early, before cropping and before retouching. Distortion and perspective changes move pixels around, so a crop made first may end up in the wrong place, and a clone stamp patch near the edge may get stretched. Correct first, then crop, then work on the picture.

Don't chase perfection on every photo either. A little barrel distortion on a portrait is often flattering, and some people add vignetting on purpose to draw the eye inwards. Paint by Zaweba gives you the control both ways, offline and free, with no account to sign into.