Gimp

Gimp is a widely used advanced pixel picture editing program under Linux. However it is far away from being intuitive. Working with ends up often in frustration when very simple things can not be done. It needs time to understand its concept and how to use it. Therefore the common pitfalls:

Note

Gimp can be considered as a bit map editor using layers. Often layers get automatically created with out expecting as:

  • When text is added

  • Cut and past a floating layer is created that can be merged using the command anchor

Many frustrating experience occur, since editing is just possible to the layer selected. An example is that when adding text to a picture, the text goes to an other layer to not damage the picture. Pop up the layer menu using Ctrl+L or via "Windows > Dockable Dialogs > Layers"

Note

Store and keep the files in gimps xfc format so layers remain.

The gimp help is woth to be installed. It uses the F1 key to sensitively point into the manual. Under Gentoo it is the separate package gimp-help

Daily work with Gimp

To paint a straight line use the brush but press Shift before and while working with the mouse.

To fill an area use the gradient icon and select gradient as FG to BG and the shape as radial or linear.With the mouse click you select start and end points. Other niche effects is FG to transparency with white FG. This gives a reflection effect.

Copy and past work after an area of pixels has been selected (Ctrl+C and Ctrl+V). Past creates a new special layer (floating selection or pasted layer). Anchor layer Ctrl+H is then used to push it back to the original layer and overwrite it. An other option is Add New Layer to have the floating layer converted to a regular layer. Copying to other layers of the same image is not intuitive. Make just the destination layer and the pasted layer visible. The convert he pasted layer to a new layer (add new layer) and then do merge visible layers.

The array of pixels can have different meaning for its data: Gray scaled, RGB color or indexed color (the value of the pixel is an index in a color map, and picks from there the color). To add color to a gray scaled picture Image > Mode has to set to RGB.

Background

Add a layer, give it a name, select and have it visible in the layer window. "Select > All" and "Edit > Fill with BG Color" this fills it with the selected background color.

Obviously it is also possible to use the FG (foreground color)

"Windows > Dockable Dialogs > Colors" lets selecting the FG and BG colors. There is also a color picker to select a color from somewhere of the screen (also outside the gimp windows).

Transparent backgrounds can be done when a new file is created, "Advanced Options" allow to select a transparent background.

Erase to transparency can be done by go to "Layer > Transparency > Add Alpha channel". Then "Edit > Clear"

Note

Not all file formats understand transparency.

Important

Lock the background layers position. In the Layer Dockable Dialoge select layer and then got to "Layer Attributes"

Adding pictures

"File > Open as Layers" will create a layer for every picture

Text

Text is added as layer so it can be edited later.

Note

When editing text a dialog appears on top of the text. This dialog might be out of the visible window, so zoom out

"Windows > Dockable Dialoge > Tool Option" lets you select options.

Animated Gifs with Gimp

Gimp supports well animated gif. When such a gif is opened, Gimp shows for every frame a layer that can be modified.

To create an animated gif pictures holding the individual frames are required.

In Gimp open them as layers and select them all. Then export them as gif and check Animation and its options as the frame per second rate.

The layer name (layer attribute) can contain additional information as "Frame 2 (100ms)", this tells how long the frame will stay visible and overwrites the default value that can be set when later exporting the gif file.

Under the menu Filters>Animation>Playback the result can be observed.

Icons with Gimp

A regular picture can be saved as *.ico (Microsoft Windows Icon). The size of the icons are typically 16*16 pixels, however it is also possible to have ico files that support multiple sizes. This is actually necessary since a 16*16 icon looks ok on the web browser corner, but looks ugly on the desktop. On the desktop icons of 32, 64, 128 pixels are used. To do this additional layers have to be added with the desired sizes. The icon can then be copied and scaled to those layers. To do this, different ways are possible. Mostly you start with the largest icon size 128*128, then you could save it in different sizes. After that you can open all individual files with open as layers, where you can select the other size images. A trick is here that the result gets the size of the largest picture. This can be controlled on the layers window and be influenced using the sequence the files have in the open dialog. At the end save it as ico.

Image maps for web pages

Image maps are used in html pages that contain an image with sensitive areas. The start is an image that can be opened in gimp. Filters > Web > Image Map opens then a second window, where the original window appears as well. Now the sensitive areas can be drawn on the original file and its actions defined. The result is not saved in the original file but in a *.map text file. This file contains the html code that has to be put into the web page. The code contains the map plus the reference to the original picture and the necessary declaration.

Troubles

No colors set Image>Mode>RGB


Linurs startpage