Gimp Wideangle Filter

The Wideangle plugin is licensed under the GPL.
The source code is available here. Latest version is 1.0.10.
gimptool --install wideangle.c will compile the plugin and install it in your local Gimp plugins directory.
The plugin appears in the Filters/Distorts menu as Wideangle....

The Wideangle filter is used to correct (or simulate) the distortion typically seen on photographs taken with a wideangle lens. There are six controls.

X Shift
Adjusts the centre of the effect, from the left edge of the image (at -100.0), through the centre (at 0.0), to the right edge (at 100.0).
Y Shift
Adjusts the centre of the effect, from the top edge of the image (at -100.0), through the centre (at 0.0), to the bottom edge (at 100.0).
Controls the amount of distortion. Negative values correct wideangle (barrel) distortion, while positive values create it (or correct pincushion distortion).
Like the Main control, but the Edge control has more effect at the edges of the image than at the centre.
Zooms the entire image in or out.
Adjusts the image brightness up or down with distance from the centre. Can be used to remove (or create) vignetting, the darkening of the corners of an image.

The Do Preview toggle enables and disables the preview window. The preview can show either an overview of the whole image, or a detail view which shows a 5x5 array of full resolution closeups. The overview is useful for casual use, while the detail view allows you to create a precisely calibrated preset for a particular lens. To create a lens preset, use a photo of a grid pattern. Start by adjusting the Main control until the lines of the grid are as straight as possible. Use the Shift controls, if necessary, to correct for any asymmetry. Finally, if the best setting of the Main control leaves a "wiggle" in the lines, use the Edge control to remove it. (You may need to readjust the Main control a little.) Once you have the correct settings for a particular lens, you should be able to save the settings as a new preset and use them for all images taken with that lens.

Or just play around.

The preset controls allow you to reset everything, select a previously defined preset, or save the current settings (if they've been altered) under a new name. Preset names can contain (fairly) arbitrary characters. If you mess up the presets, they are stored in a text file under your Gimp user directory in the wideangle subdirectory.

Regardless of the Gimp's settings, the Wideangle filter always uses cubic interpolation. This is not a bug, it's a feature.

What's with the pop up menu on the "select" button?

I originally had a regular option menu to select presets. However this had a drawback, namely that the displayed option was only correct until a control was adjusted. A pop up menu, although not the normal choice, provides exactly the correct model to the user.

Written by David Hodson. Many thanks for suggestions and improvements to Lars Clausen. (But bugs are still my fault.)