A shadow is just a dark silhouette of an object, but with a somewhat
fuzzy edge to account for the diffraction of the illuminating light
source. Furthermore, depending on the
location of the source of light, a shadow is somewhat displaced with
respect to the object. You can construct very convincing shadows in
the GIMP. These are surprisingly useful rendering tools in image
manipulation, and this section explains how to make them.
To make a shadow for an image object you must have a selection of it.
The following describes the steps needed to create the selected
- Cut the selected region by typing C-x in the image window. This
places the selection into the default buffer.
- Create a new transparent layer by clicking on the New Layer
button in the Layers dialog and choosing the Transparent option.
- Paste the contents of the default buffer by typing C-v in the
image window. This places the paste into a floating selection.
Anchor the float to the new layer by clicking on the Anchor
button in the Layers dialog.
- Duplicate the new layer by clicking on the Duplicate Layer
button in the Layers dialog. The duplicated layer is placed above the
original layer in the layer stack.
- Name the duplicated layer Object and the original layer
- Make the Shadow layer active by clicking on its thumbnail in the
Layers dialog, toggle on the Keep Trans. checkbox in the Layers
dialog, and use the Bucket Fill tool with its Threshold set to
255 to fill the image object with black or some other appropriate,
- Toggle off the Keep Trans. checkbox in the Layers dialog, use Gaussian Blur (IIR) found in the
Image:Filters/Blur menu to blur the Shadow layer, and use Offset from the Image:Image/Transforms
menu to shift it.
- Use the Opacity slider in the Layers dialog to give the shadow an
appropriate degree of transparency.
This procedure is often referred to as making a drop shadow.
An example of creating a drop shadow is now presented using the preceding
A Daisy Selection
illustrates a photo of a daisy. Using techniques from
a selection of the daisy is made and, as shown in
(b), this is used to cut away the
daisy's background. (Note: the cut produces a transparent background
only if the original image layer has an alpha channel. For more on
alpha channels see Section
.) The Layers
dialog in Figure
(c) shows that the Daisy layer
has been duplicated and that the lower layer has been labeled Daisy
The remaining steps in the creation of the shadow are now easy. The
Daisy Silhouette layer is filled with black using the Bucket
Fill tool (don't forget to set Threshold to 255 in the Bucket
Fill dialog). The blurring can be performed
with any of the blur functions from the Image:Filters/Blur menu
(but make sure that the Keep Trans. button in the Layers dialog is
toggled off before applying one). Here, Gaussian Blur (IIR) is
used with a radius of 20.8.1 This is followed by using Offset , which can be applied by typing C-S-o in the image window.
The offset parameters are set to 15 for both the X and Y components,
and the Wrap-Around radio button is toggled off. The result is shown
Filling, Blurring, and Offsetting Creates the Shadow
(b) and (c) show the dialogs for the
Gaussian Blur (IIR)
filters used in this
All that remains is to place the flower and shadow over an appropriate
background. This could be anything: a solid color, an image pattern,
or a photograph. Figure
The Final Drop Shadow
illustrates the daisy on a light blue background. The Layers dialog
(b) shows the placement of the blue
layer at the bottom of the image stack. This layer was created by
clicking on the New Layer
button in the Layers dialog,
positioning it to the bottom of the layer stack, and using the Bucket Fill
tool to give it the desired color.
By the way, the shadow produced using this technique can be made to
look more diffuse by making it more
transparent. Simply make the shadow layer active in the Layers dialog
and set the desired value of transparency using the Opacity slider.
A technique very similar to making drop shadows is that of making
punchouts. A drop
shadow creates the illusion of an image object floating above a
background. The punchout is also a shadow technique but gives the
illusion that part of the background has been cut away casting a
shadow on yet another background behind. This is the effect you would
see by holding a stencil slightly in front of a wall. The light
shining through the stencil casts a shadow that can be seen through
the stencil's hole, against the wall.
Like for drop shadows, to make a punchout for an image object you must
have a selection of it. The procedure for making a
punchout is similar
to that for making a drop shadow, but with a couple of twists. To
make a punchout in the shape of a selected image region follow these
- Set the default colors by typing d in the image window.
- Create a new layer by clicking on the New Layer button in the
Layers dialog, and select Foreground as the Layer Fill Type in the New Layer Options dialog. This fills the new layer with black.
- Make sure that the new layer is active in the Layers dialog, and fill
the selected region with white using the Bucket Fill tool.
Label this layer Shadow.
- Cancel the selection by typing C-S-a in the image window, and
create a layer mask for the Shadow layer by choosing Add Layer
Mask from the Layers menu.
- Make the Shadow layer active by clicking on its thumbnail in the
Layers dialog, and copy it to the default buffer by typing C-c
in the image window.
- Make the layer mask of the Shadow layer active by clicking on the
layer mask's thumbnail in the Layers dialog, paste the default
buffer's contents by typing C-v in the image window, and anchor
the resulting float to the layer mask by typing C-h in the image
- Make the Shadow layer active, blur it with Gaussian Blur
(IIR), and shift it with Offset.
This creates the punchout effect.
An example of making a punchout is now presented. The example
deviates slightly from the steps described in the preceding list.
shows an impressive flash of lightning across a deep purple sky. You
can just imagine the powerful clap of thunder that's coming. But in
case you can't, we're going to drive the message home by punching it
out of the photo.
We begin by setting the default colors by typing d and then
switching the background and foreground colors by typing x in
the image window. A new layer is created by opening the Layers dialog
and clicking on the New Layer button. The Background radio
button is selected from the New Layer Options dialog. This sets
the new layer to black. For this example the new layer is labeled
The Text tool is now invoked by clicking on its icon in the
Toolbox and then clicking in the image window. This brings up the
Text tool dialog shown in Figure
Placing Some Text
The Brushstroke font has been chosen with a height of 100 pixels, and,
because the goal of choosing this font is to get a rough punchout
effect, the Antialiasing option has been turned off, as shown in the
tool's Tool Options
(d)). Clicking on the OK button in
tool dialog places the text into a floating selection.
Because the Active Foreground Color
is white, so is the newly
Cutting the floating selection with C-x and then pasting it back
with C-v centers the text before it is anchored into the layer
below by clicking on the Anchor button in the Layers dialog.
This makes a layer with white text on a black background.
8.20(a) shows the image window, and
8.20(b) shows the corresponding Layers
dialog at this stage in the example.
The procedure is almost complete. If we were making a drop shadow,
the new layer would be blurred and offset. However, for the punchout,
we first copy the Inverse Text layer into its own layer mask. This is
done in the following steps:
- Make the Inverse Text layer active by clicking on its thumbnail in the
- Copy the Inverse Text image contents to the default buffer by typing
C-c in the image window.
- Create a layer mask by choosing Add Layer Mask from the Layers menu.
- Paste the default buffer contents by typing C-v in the image
- Anchor the resulting floating selection to the layer mask by clicking
on the Anchor button in the Layers dialog.
The result is shown in Figure
Creating the Layer Mask
(b) shows the corresponding Layers
The final step is to blur and offset the text in the Inverse Text
layer. To do this, the Inverse Text layer is made active by clicking
on its thumbnail in the Layers dialog. This layer is then blurred
using the Gaussian Blur (IIR) filter with a radius of 8 and
shifted using Offset with values of 4 for both X and Y. The
result is shown in Figure
The Final Punchout
The blurred and offset inverted text now appears as a shadow seen
through a stencil punched out of the photo.
(b) and (c) show the dialogs for
the Gaussian Blur (IIR)
filters used in this