Creating Bevels in the GIMP
Novell Cool Solutions: Feature
By Scott M. Morris
Digg This -
Posted: 7 Jun 2006
- SUSE Linux 10.0
- SUSE Linux 10.1
One of the nice things about Linux is the support it has for multimedia. Namely, it has a well-rounded image manipulation application called the GIMP. It is quite popular and many people enjoy using it. I have seen a small handful of tutorials on how to use this slick tool. However, it feels like to me that there could be more good articles written on how to perform useful image manipulation operations using this application. It is with that in mind that I have written this article. In it, I want to delve a bit into how to make beveled edges for buttons in the GIMP.
For the sake of simplicity, we will be putting a beveled edge around an elliptical shape. The same theory will apply to other shapes, as well.
Install it and Run it
First, let's make sure you have the GIMP installed. Most of the time, it should already be on your system, but let's make sure. Open up YAST, go into SOFTWARE MANAGEMENT, and search for the package called gimp. When it comes up in the right pane, make sure the the checkbox next to it is ticked. Then, click ACCEPT:
YAST may ask you for some CDs as it installs the software.
Next, we will run it.
For KDE users, follow this path:
K Menu => Graphics => Image Editing (GIMP)
For those on the Gnome desktop, follow this path:
Applications => Graphics => Image Editing => The GIMP
If this is the first time you have run the GIMP, you will see the GIMP User Installation wizard. You are generally safe to click through this wizard without changing anything. When you have done this, you will see the GIMP appear. It will probably show you a Tip of the Day window, which you can close. You should now see two windows that look something like this:
Making an image to work with
First off, we'll need an image to perform our operations on. We will just make a round shape for this purpose. From the menu at the top of the left window, select FILE and then NEW:
A window comes up called "Create a New Image." In this window, there is a TEMPLATE drop-down box. From this drop-down, select "640x480". Expand the ADVANCED OPTIONS section. In the FILL WITH drop-down box, select TRANSPARENCY. When you are done, click OK:
At this point, we have a blank window with the checkered pattern in the background, looking something like this:
This is the canvas that we are going to work with for our image. Next, we need to make a circular shape to work with.
Select the Elliptical Region selection tool. It has an icon looking like this:
Next, go out onto your canvas. Click and hold, then drag (down and to the right). Then, let go of the mouse button. You will see that you have drawn a circular selection. What you are really doing is telling the GIMP which part of the picture you want to work with. You should see something very similar to this:
Now, we just have to fill that baby up with some color. Go over to the main GIMP window. You will see a foreground/background color swatch:
We're looking for the foreground color. It is the one on the upper-left. In my case, it is the black color. Double-click it, and another window will come up where you can pick the color you want to use for your foreground. Pick your favorite color and then select OK:
To fill our ellipse with our new color, we'll need to click on the paint bucket:
Then, we click inside of our ellipse, and it fills with our new color:
Since we don't need our elliptical selection anymore, we can press CTRL + SHIFT + A to get rid of it.
Preparing the layers
For our next step, we will want to make a copy of the elliptical shape. We are going to use this copy to help define how we want the bevel to look. To do this, go over to the GIMP window that should be on the right side. Make sure the layers tab is selected. It has an icon in it that looks like this:
In this tab, in the middle of the window, there are several buttons. Click on the DUPLICATE LAYER button, which looks like this:
You should see another layer appear above that button:
We need to rename these layers so we can keep them straight. Right-click on the bottom one (mine is called "Background"). A menu will appear. Select "Edit Layer Attributes" from this menu:
A little window appears, where we can change the name of the layer. Name this layer "Elliptical Shape". Then click OK:
Next, rename the top layer to "White Blur". We'll see the reason for this name in a moment.
You should now see something very similar to this:
For this next part, make sure you have the "White Blur" layer selected. Then, we're going to check the "Keep transparency" box:
Then, go to the main GIMP window. Find the foreground/background color swatches again. Just to the lower-left, there is a small button, which I'm hovering over with the mouse cursor here:
Click on that icon to reset the foreground color to black and the background color to white.
Next we need to fill the "White Blur" layer with white. To do this, go to your image canvas window that has the elliptical shape in it. Click on the EDIT menu, and select "Fill with BG Color". You will see your shape turn white:
Don't worry, the colored one is still there, it's just underneath the white one.
Next, we will uncheck the "Keep transparency" box:
With the shape duplicated and colored white, we now need to blur the edges.
To do this, we will be working in the image canvas window. Go up to the FILTERS menu, select BLUR, and then GAUSSIAN BLUR. A window will appear asking you how you want the blur done. Put 15 into the "Horizontal" box and 15 into the "Vertical" box. When you are done, click OK:
Your white shape will now have a cool looking halo around it:
Now we know why we named that layer "White Blur". It's white and it's blurred.
Next, we need to trim the edges of the "White Blur" layer. To do this, we will start by right-clicking on the "Elliptical Shape" layer. A menu will appear, from which we will select "Alpha to Selection". This option is very near the bottom of the menu:
Then, we go over to the image canvas window. Open the SELECT menu, and click on INVERT.
Now go back to the window showing the layers. Select the "White Blur" layer:
One last time, go back to the image canvas window. Click on the EDIT menu, and select CLEAR. Your "White Blur" layer gets trimmed around the edge:
We don't need the selection anymore, so press CTRL + SHIFT + A to deselect everything.
Creating the bevel
Are we there yet? Almost. The last step will be to create the bevel using our carefully prepared layers.
Firstly, over in the right-hand GIMP window, we need to select the layer called "Elliptical Shape". It should be the bottom layer:
Go back to the image canvas window. Open the FILTERS menu, select MAP, and then click on BUMP MAP. This will open another window prompting for your preferences. The very first thing you need to do is go to the BUMP MAP drop-down box, and select the "White Blur" layer from the list. Then, set all the other options as you see in this screenshot, clicking OK when you are done:
You will see the progress bar go across the bottom of your image canvas window. When it is finished, it will probably look quite like it did before. To reveal the effects of what we just did, we will need to remove the "White Blur" layer.
Select the "White Blur" layer from the list. Then click on the "Delete Layer" button:
You will see the "White Blur" layer disappear from the list above, and also from your image canvas window, revealing the beveled image:
At last, we have success. When combined with other effects, beveled edges can add quite a bit to the quality of your images. For example, here is a beveled button:
That seems like a lot of steps. Once you get used to creating bevels in the GIMP, it becomes quite easy. It creates a nice effect for graphics, and is worth the effort. Take a few moments to learn this cool skill. You will be glad that you did.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com