Sie sind auf Seite 1von 21

HelpSetMaker Tutorials

Dirk Hillbrecht

17th February 2004

Contents
1 Tutorial: How to create screenshots 3
1.1 What to show? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Take the shot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Manipulate the screenshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.1 The fade effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.2 Emphasing the dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.4 Integrating the screenshot into the documentation . . . . . . . . . . . . . . . . . . . . . . . . . . 19

2 History 20

1
HelpSetMaker Tutorials
How to produce a good documentation HelpSetMaker is a great tool for producing online and printed docu-
mentation. However, you have to know what you want to say and how to say it. If you are unfamilar with the task
of documentation, this might be not as easy as it sounds.
The tutorials in this document want to help you in this task of creating documentation. We’ll present different
techniques on how to document things and how to work with certain tools. We’ll work with several helper programs
during the trails, but those will be Open Source Software and available on all relevant platforms. Therefore,
regardless of the used platform, you should be able to perform everything described in this document.

Note These tutorials are designed in a way that you get knowledge of reasonable number of tools. If you follow a
trail, you will perhaps find that certain targets could be reached in a simpler or better way. Feel free to experiment
with that. Sometimes, the more complicated way has simply been chosen because the author did not know better
himself when he wrote the explanations. In other cases, the more complex operation brings certain advantages
compared to a simpler approach. Normally, such circumstances are mentioned, however.

2
1 Tutorial: How to create screenshots
Often, HelpSetMaker will be used to create documentation for programs. It is important to describe actions and
features not only by text, but also by pictures. This tutorial shows you how nice screenshots can be created for
inclusion into HelpSetMaker documents. We need
• a screenshot program. In the examples, we’ll work with KSnapshot, the KDE screenshot program. Of
course, you can use any other program.
• an image editor. This tutorial shows the needed steps using GIMP, a free image manipulation program.
Gimp is available for free for Linux and Windows platforms.

1.1 What to show?

It might sound superfluous, but the first and perhaps most important question is: What do you want to show? A
screenshot should limit itself to exactly that item which is important. If you want to show a task requiring several
steps, consider taking several shots and arrange them as a sequence.
In our tutorial, we want to create a screenshot showing the "Settings..." menu item. You can see the final
result of what we produce below or in the section about project settings of the HelpSetMaker manual.

Figure 1: The settings menu item screenshot

1.2 Take the shot

For taking the screenshot, start the screenshot program. Here we use KSnapshot, but any other program will work
until it saves the taken shot in a lossless file format, e.g. PNG. Almost surely you won’t find a program without this
capability.

Figure 2: KSnapshot dialog

3
You should arrange the program window appropriately, e.g. by making it as small as possible but yet showing
everything needed for your explaining picture. Screenshot programs do normally have settings for
• preselecting the snapped area. Set this to "selected window only" as you normally only want to have the
window of your program.
• activating a delay between pressing the "Snap!" button in the program and the actual snap shot moment.
This is useful if you have to open dialogs or do something else in the window-to-be-snapped.
After having prepared everything, start the snapshot process. Most snapshot programs will remove themselves
from the screen while the delay is running so that you have enough space to arrange the items to be snapped.
If your snapshot has been taken, the snapshot program normally somehow shows it on screen. Take a careful look
on it: Is it ok? Does it show everything needed? Are there any quirks you better do not want to have in the result?
This shot is the starting point for your documentation part. As often, the final result normally cannot be better than
this starting point. So, make it as good as possible.

Figure 3: Original screenshot for the settings dialog

Our example screen qas quite simple to arrange. A project has to be loaded and the menu is open. Furthermore,
the menu item in question is selected. Note that screen shot programs often do not include the mouse pointer. If
you absolutely want to have it in your final picture, you will have to put it in afterwards.

Note

Originally, our screenshot includes the complete program window of the HelpSetMaker. However, as everything
interesting happens in the upper left corner of the program frame, we’ll normally restrict the pictures in this tutorial
to that range of the picture.

1.3 Manipulate the screenshot

So, now you have the unchanged screenshot. You could stop any further editing at this point, simply add the shot to
the image library for your documentation project and use it as it is. However, this has some serious disadvantages:
• The picture normally is too big, both in file size and in area. The important details get lost.
• There is no special mark for the important items. If you look at our example, the menu is shown, of course.
But there is no special hint that this menu is the important item in the picture.
• Sometimes, there are even other things in the picture which might attact the user’s interest even more than
the thing you intended to explain with the picture.

4
All these reasons imply the strong advise to give the screenshot some more polishing. Our polishing tool is the
GIMP. It is free and available for all important platforms. So, lets start.
1. Start the GIMP
2. Open its "Load" dialog in the main menu.

Figure 4: Load menu

3. Select the image to load.

Figure 5: Load dialog

4. GIMP loads the image and shows it in the main screen


The screenshot shows all important windows:
• The GIMP main window in the upper middle (its size has been changed a little bit compared to the
default)
• The "layers" dialog in the upper right
• The "brushes" dialog in the lower right
• The editing frame behind all the other frames covering most of the screenshot
GIMP is very relaxed about opening new windows during operation. Almost everything is put into a new window.
If you work with a screen manager capable of handling virtual screens (such as KDE on Linux), consider giving

5
Figure 6: GIMP windows

GIMP just a complete virtual screen. On Windows, you should minimize all other programs while working with
GIMP.
Our image manipulation is split into two main steps:
• Creating the fade effect on the important picture part and crop the picture to it.
• Adding the red emphasis on the dialog
Both steps are independant from each other. You could also perfrom the alone or together with other steps on the
picture. Feel free to experiment with the capabilities of GIMP to archieve other results than the ones shown here!

1.3.1 The fade effect

Many screenshots in the HelpSetMaker manual use a "fade" effect on the screenshot. We will create this now in a
step-by-step fashion. First, some words about the concepts:

The concepts

For our effect, we need two powerful concepts of GIMP: Layers and layer masks

Layers

GIMP handles pictures not only as bitmaps arrays, but as a stack of "slides", or, to say it with GIMP’s words:
"layers". Each layer contains a complete picture on its own and the final picture is composed by looking through
all layers from the top of the stack. Of course, this does only really make sense if the layers may contain transparent
sections (just as slides do...). As we’ll see, this is indeed possible.

6
Layer masks

Another important concept is the layer mask. Each layer can have such a mask, which, in the beginning, is nothing
more than a greyscale painting applied to the layer additionally to its original content. The magic is that the grey
value of each pixel in the "mask painting" defines the opaqueness of the original layer content. A white pixel in
the mask means "totally opaque", a black pixel is for "completely transparent". Shades of grey define any level of
semi-opaqueness: The darker, the more transparent.
As you might already have concluded, the layer masks will be the most important tool for our fade effect.

Prestep: Make the picture maskable

Saying every layer in the picture has a mask is a little bit too general. In fact, one layer has not: The "background"
layer.
Unfortunately, after loading a PNG file into GIMP, the complete content actually is in the background layer. We
have to change this:
1. Open the "Layers" dialog. As you see, there is only one layer and it is named "background". Click on the
"Copy" button in the bottom of the window. A new layer appears, named "Background copy".

Figure 7: Copy the background layer

2. Remove the old and superfluous "Background" layer.

Figure 8: Remove old background layer.

7
After these two steps, we have the starting point for our mask operation

Creating the fade effect

The central point of the fading effect is to apply a layer mask to the picture and make it "fading" between white
and black.
1. You start by actually adding a layer mask to the picture layer.

Figure 9: Add a layer mask

Note that after this operation, you will not be able to work on the actual layer content any more. Every
painting operation will affect the mask only, not the content.
2. GIMP asks how your mask should be initialized: All-opaque, all-transparent or from the alpha channel. We
start with an all-opaque mask.

Figure 10: Layer mask initialization

Note that even though colors are mentioned here in the dialog, you won’t see any of them in the picture.
These colors are more or less "virtual" and define the transparence level of the layer mask as described
above.
3. Now that the layer mask is initialized, we can work on it. Currently, all pixels are white and therefore the
mask is completely unmasking. We’ll change this now.
4. Select the brush tool from the GIMP’s main menu. Do also have a look at the selected brush type. Take the
biggest circular one.
Take care (any adjust if needed) that the painting color is black!
5. Have a look at the picture. The fading should take place not too near to the important part, but also not too
far away. Think about it, then take your just selected brush tool and paint a nicely rounded curve where you
want to have your fading frontier.

8
Figure 11: Brush selection

Figure 12: Painting the fade frontier

As we are in layer mask mode, your painting goes onto the layer mask changing pixels into black. Black
means "totally transparent" and therefore the content of the picture completely disappears. Instead, a grey-
in-grey-square pattern is shown, which means "nothing".
If you feel uncomfortable with your just-painted curve, use the "Undo" feature of GIMP and try again. Often,
you get the best results if you draw the curve in "one move".
6. Take the brush to enlarge your mask towards the final content of the picture. I.e. remove the important things
and let the unimportant there.

Figure 13: Enlarge mask with brush

9
7. Finishing the mask just with the brush is an unfullfilling task. GIMP has better tools for this. Take the
hand-drawn region tool from its main menu.

Figure 14: Hand drawn region tool

8. Use the tool to select the complete yet-to-be-fillen area. Press the mouse button at beginning and then
surround the complete region without releasing the mouse button. At the left and upper side, drag the mouse
over GIMP’s own decorations to be sure that you get all of those picture’s regions.

Figure 15: Select the remaining picture parts

9. Now, switch to the fill tool.

Figure 16: Fill tool

10. Place the mouse cursor in the just-selected region and press the left mouse button. The complete region is
filled with black and therefore the mask turns into "full transparent" mode.
11. Remove the fill selection. This is important as as long as there is a selection, all operations will only cover
that selection. Our next steps have to be applied to the whole picture, however.
12. Now, we have a mask which removes exactly those things from the picture we need and leaves the crappy
rest intact. Fortunately, it is very simple to change this by applying the "invert" operation to the layer mask.

10
Figure 17: Fill the rest of the needed region

Figure 18: Remove fill selection

13. Inverting brings us a big step forward. We do now have a mask which leaves only those parts of the picture
we are interested in. It does not fade, however. This can be changed with a smoothing filter operation. We
take the IIR-Gaussian blur filter. It smoothens a picture by taking average values from certain pixels around.
The more pixels, the smoother the filter operates. For our fading effect, a number between 30 and 40 is the
best.
14. Aha! Now we have that smooth fadeout effect we were so eager for.

Cropping the result

Time for cleanup. First, we crop the picture so it does not contain all that white-to-be stuff which is now masked
out.
1. Select the crop tool from GIMP’s main dialog.
2. Now, open a rectangular area with the crop tool. Be sure that the upper right corner really is (0,0). You can
adjust this in the dialog, too. Do not crop too near to the fadeout area as it might be that the fadeout effect
itself is cropped then, too.

11
Figure 19: Invert the mask

Figure 20: screenshot/gaussblur.png

3. The cropping result is now the picture with the dimensions it will have in the end and the complete fading of
the main content.

Removing the transparent portions

The effect work is now finished, but there could raise problems from the current picture state. As indicated by the
chessboard pattern, there are transparent regions in the picture now. The PNG format can cope with this, as can
do most web browsers, but there might be some having problems or showing wrong results. Therefore, we’ll turn
these transparent regions into white now.

12
Figure 21: Blur result

Figure 22: Select crop tool

Figure 23: Cropping the picture

1. Turn again to the layer window. Create a new layer and set its initialization color to "white".
2. The new layer is created on top of the layer stack. Therefore, the picture turns while completely. Correct

13
Figure 24: Crop results

Figure 25: Create white layer

this by moving the new layer down.

Figure 26: Move white layer down

3. Voila. The picture now features the fadeout exactly as we would like to have it

14
Figure 27: Blur to white

Final cleanup

Two final cleanup steps can be done on the picture: Applying the layer mask and merging the layers.
1. Apply the layer mask for the main content layer. This will make the masking permanent and unchangeable.
Before this step, you always can completely revert the masking process and start a new one on the original
picture data.

Figure 28: Apply layer mask

2. Merge the two remaining layers into one. As PNG cannot store multiple layers, this step would happen
anyway on storage of the picture. Doing it now saves you one warning message.
3. Merging layers always raises a dialog. Its options do only make a difference if the layers in the picture differ
in size and position. As this is not the case, just go for the default setting.

1.3.2 Emphasing the dialog

After having applied the fade effect, we now add an emphasis to the dialog. Starting point is the picture after
addition of the white background and merging of all layers.
1. Create a new layer in the picture in the "Layers" window. Set its default filling to "transparent".
2. After addition, check whether the new layer really is

15
Figure 29: Merge layers

Figure 30: Merge layer options

Figure 31: Starting point for emphasis

• on top of the stack,


• selected and therefore the one you are working on.
As the new layer is all-transparent, you won’t see anything of it at this stage.
3. We will have to do pixel-exact work now. Therefore, click on the glass tool to magnify the picture display.
4. Click into the main window to magnify the display. Then move the scroll bars and resize the window so that
the complete area-to-be-emphaized is shown on the screen.
5. Take the rectangular region selection tool from the GIMP’s main menu.
6. Select the menu region. It is composed out of two rectangles, one around the menu bar item ("Project"),
one around the actual menu. To archieve the unified selection, follow these steps:

16
Figure 32: New layer dialog

Figure 33: Layer configuration for emphasis work

Figure 34: Glass tool selection

• Point to the lower left corner of the menu and press the mouse button.
• Drag the selection box to the upper right corner.
• Release the mouse button. The menu is selected.
• Point the mouse exactly to the left border of the selection rectangle.
• Press the "Shift" button on the keyboard. A small "+" is attached to the mouse cursor.
• Press the mouse button. Drag the mouse. A selection square opens.
• Release the "Shift" button. The "+" is persistant at the mouse cursor but you are now free again to drag
any non-square selection regions.
• Move the mouse pointer to the upper right corner of the menu bar item "Project".
• Release the mouse button. The new selection is added to the current one.

17
Figure 35: Screen composition for emphasis work.

Figure 36: Rectangular region selection

Pressing "Shift" for unifying region selections (or "Ctrl" for intersecting ones) works with all selection tools.

Figure 37: Selection of emphaised area

7. Select the fill tool again and click on the foreground color in the GIMP’s main menu. Change the foreground

18
color to red.

Figure 38: Fill tool and color selection

8. Click into the selected area. It will be totally filled with red hiding the menu completely.

Figure 39: Fill the selected area

9. Go again to the "Layers" window. Change the overlay settings for the emphazing layer. Its overlay mode
should be changed to "Multiply/Burn" and the opacity to something around 30.
10. Cool. The red color is now semi-transparent and does not hide the menu any more, but emphazes it as it was
planned.
11. As with the fade effect creation, it is possible now to merge the layers.

1.4 Integrating the screenshot into the documentation

As the screenshot is finished now, it can be integrated into the help information. Therefore, the picture has to be
saved. Best file format is almost always PNG. Only under very special circumstances, it could be better to save it
in a lossy format like JPG, a scenario for this could be that there are photos in the screenshot.
PNG files should always be saved with the highest compression level.
To make new pictures visible for drag’n’drop, you might have to rebuild the image hierarchies.

19
Figure 40: Overlay settings

Figure 41: Emphaized menu

Figure 42: "Save as..." menu item

2 History
• 2004-02-13: Version 1. Includes Trail on sophisticated screenshots.

20
Figure 43: PNG settings

21

Das könnte Ihnen auch gefallen