Professional Documents
Culture Documents
PAINTING
YOUR SITE
Georgios M. W., www.sxc.hu
Good homepage design is a question of the layout. Sometimes the best option is to use a graphics program
to design the page, then translate the result into HTML code. The versatile image manipulation program
S
ome purists believe they must Suse users will need to add the Python Dialogs | Layers or [CTRL+L] will
compose HTML code line by line extension and the Py-Slice plug-in manu- open the Layers dialog. Clicking New
in a text editor to achieve clean ally [2]. After doing so, launch GIMP Layer creates a new layer. In the dialog,
results, but other developers are occa- and create a new image (File | New). enable Transparency below Layer Fill
sionally willing to consider alternatives. Then select the 800x600 entry in the Type, and confirm by pressing OK, to
One little known alternative is the option Templates drop down. This is the resolu- create a new layer. Everything you add
of creating a graphics file in GIMP and tion we will be using for the homepage. to the image now will be placed in this
then converting the file directly to Then enter a name for the file; you will layer.
HTML. GIMP version 2 (www.gimp.org) be storing the file under this name later. Press [Ctrl+A] to select the whole
or newer includes the Py-Slice plug-in, Make sure you use GIMP’s native .xcf image. The dotted line surrounding the
which converts the image into a collec- format to have access to all of GIMP’s image shows the boundary of the selec-
tion of tiles, and then creates an HTML features. tion. Then select Rounded Rectangle in
table that organizes the tiles into an the Select menu; set the value for Radius
image that looks like the original. The The Sample Project
THE AUTHOR
results can easily be used for homepages GIMP uses so-called layers. You can Peter Kreussel studied German,
with attractive graphics, like the example compare the GIMP layer system to a English and philosophy. Today, he is
shown in Figure 1. stack of photographic slides. The layers an editor of both online and print
Most current distributions give you may be viewed together for the complete media. Peter has had a computer
GIMP version 2.2; we will be using this image, or you can edit each layer sepa- ever since the days of the C64.
version for the remainder of this article. rately.
to five percent. This gives set the values for red, green,
you a selection with rounded and blue to 255. Then click
edges, as shown in Figure 1. the selected area with the fill
Now fill the whole selec- tool to color the selection
tion with a red color. To do white. You can then press
so, click on the foreground [CTRL+A] to disable the
color selection in the toolbox selection.
and set the values for red,
green, and blue to 190, 0, and Eye-Catching
0, respectively, to use a dark Effects
red tone. Select the fill tool in The 3D effect comes courtesy
the toolbox and enable Fill of the Drop Shadow in the
whole selection below Script-Fu | Shadow menu. In
Affected Area. Then click on the layers dialog, select the
the selection to apply the fill layer you just created, and
color. then apply a drop shadow.
For your next step, you GIMP will automatically add
need some guides. To draw a enough space for the shadow
guide, click on Image | Guide to the graphic image. How-
| New Guide, select the hori- ever, the white background
zontal Direction, and choose will not grow to match. After
a position of 100. Repeat the selecting the background
steps to create another hori- layer in the layers dialog,
zontal guide, using a value of click on Layer | Layer to
525 this time, and then add image size to resolve this.
two vertical guides at posi- The 3D label is still miss-
tions 125 and 725. The guide ing. Start by adding normal
intersections mark the cor- text with the text tool. Our
ners of the white rectangle at example uses the Sans Bold
the center of the page. Italic font and a slightly
Make sure you have lighter red than of the back-
enabled the option Snap to ground color, with values of
Guides in the View menu. 250, 225, and 225 for red,
Then select the scaling tool green, and blue, respectively.
from the toolbox and click on Clicking with the text tool in
Transform selection below the white area opens a dialog
Affects in the main GIMP window where you can enter
window. Now, when you Created.
click on the drawing, the Select Sans or any other
Scaling information dialog non-italic font as the font for
appears. Drag the small boxes the shorter piece of text and
at the corners of the dotted reduce the size. Clicking with
selection rectangle to the the text tool below the piece
guide intersections so that of text you have already
the selection matches the added will create a new text
empty white area. The guides block. Both texts will appear
will automatically attract the as separated layers in the lay-
mouse to improve positioning ers dialog. Select one of the
accuracy. Then click Scale to blocks and, in the toolbox,
complete the procedure. click the Create path from text
To fill the selection with button, which appears when
white color, add another layer you select a text. Then repeat
via the layers dialog. Select this step for the second block
the top entry and click on of text.
New Layer, again making the A path has a similar func-
background transparent. tion to a guide; however, it is
Then set white as the fore- in fact an embedded vector
ground color in the toolbox graphic with an arbitrary
palette; that is, you need to shape. A path will not appear
COVER STORY Web Design with GIMP