This is a simple gradient plugin for GIMP, written in python. It applies a linear gradient to a rectangular selection, in one of four directions, using the colours of the pixels at the starting edge, and fading, either to the background colour, or the colours of the pixels at the finishing edge. The gradient effect is stored in a new layer. To try this out, all you need to do is download the script, and store it in the gimp plugins folder, in your home directory. Remember to set the executable flag on the file.
The script can be downloaded from HERE.
An example shows how to use it. First, open a suitable image with gimp.
Select an area to apply the gradient to.
Now, run the plugin, which is found under /Filters/Artistic/Smart Gradient.
The gradient can be applied in one of four directions. Make your selection, and click OK. If the selection area is large, it may take a while to run.
You can also choose to fade out to the colours at the selection edge, rather than the background colour.
This time choose Fade To Selection Edge Colour
If you would like to leave feedback, you can do so HERE.