Tutorial: Making a faded frame with GIMP Quickmask


There are several tutorials around about GIMP's quickmask feature, but none of them tell you how to do what I always want to do: make an image fade to transparent around the edges, e.g. for putting it on a web page.  With the help of some folks on #gimp, I now know how to do this, and want to share it with the world.

I first made this tutorial drawing gradients on each edge of the image.  Immediately someone on #gimp suggested a better way, and later I thought of a still quicker way.  So I'll offer a couple of different approaches.

Here's a different tutorial showing how to do the same thing using a layer mask.

Method 1 (fastest): quickmask with a fuzzy rectangular selection.

Step 1: Get your image. original image
Step 2: Make the quickmask.
Click on the quickmask button -- the button at the lower left of the GIMP window with the red rectangle on it.  You want a quickmask over the whole image.
The quickmask appears as a reddish transparent layer.
setting the quickmask
Step 3: Make a fuzzy rectangle selection.
In the Rectangle Selection Tool Options dialog, check Feather and select your desired radius.
Then make your rectangular selection.
fuzzy rectangle
Step 4: Invert the selection.

The goal is to paint on the border, not inside the rectangle.
Select->Invert, or ctl-I.
Fuzzy rect selection made
Step 6: Select bucket fill in the toolbox, fg color white. bucket fill, white
Step 7: Click in the border to paint it white.
Which won't look white in the window, of course: you're painting on the quickmask to make that part of it disappear, not painting on the image.
Painted out the quickmask frame
Step 7a (optional): Fuzz the frame some more using Blur.
The rectangle selection tool will only feature up to 100 pixels.  If you want more of a fade than that, use one of the Blur tools.

Step 8: Change the quickmask into a selection.
Click on the funky little button just to the left of the quickmask button.
Quickmask converted to selection
Step 9: Clear.
Edit->Clear, or ctl-K.
Cleared
Step 10: You're done!

Save it as a png or some other format that preserves transparency.
final image


Method 2: painting gradients on the quickmask.

This method is harder and more time consuming (don't be fooled by the fact that it has fewer numbered steps: Steps 4 and 6 can take a while to get right).  But if you need a lot more fuzz than you get with featured selection and Blur, or if you need more control in order to get specific effects (angular fades, different fades on different sides, nonlinear fades, etc.) then Method 2 might be just the ticket.

Step 1: Get your image. original image
Step 2: Make the quickmask.
Click on the quickmask button -- the button at the lower left of the GIMP window with the red rectangle on it.  You want a quickmask over the whole image.
The quickmask appears as a reddish transparent layer.
setting the quickmask
Step 3: Get ready to make your gradient.
Foreground color black, background white,
and select the gradient tool.
Gimp main window, ready for gradient
Step 4: Make the bottom of the gradient.
To make the gradient, you'll be painting onto the quickmask (which is already selected for you).
With the gradient tool selected in the gimp toolbox,
click in the image where you want the top of the fade to begin, drag straight downward to the edge of the image, then let go.
It's quite sensitive to angle: if the fade isn't horizontal, then ctrl-Z to undo and try again until you're happy.

Bottom gradient made
Step 5: Change the mask in the gradient tool.
To add the fades at the other three corners, use "Addition" or "Darken Only" instead of "Normal".
(If you're not already showing the Tool Options dialog, you can get it by double-clicking the gradient button in the toolbox.)
The gradient tool dialog
Step 6: Make the fades in the other three corners.
Fades on all four corners
Step 7: Change the quickmask into a selection.
Click on the funky little button just to the left of the quickmask button.
quickmask converted to selection
Step 8: Clear the selection.
Ctrl-K, or Edit->Clear.
Cleared selection.
Step 9: You're done!
Save it as a png or some other format that preserves transparency.
Final image with transparency

More linux imaging info
Shallowsky home