Kapitel 3. Första stegen med Wilber

Innehållsförteckning

1. Grundläggande begrepp
2. Huvudfönster
2.1. The Toolbox
2.2. Bildfönster
2.3. Dialoger och dockning
3. Ångra
3.1. Saker som inte kan ångras
4. GIMPLite Quickies
4.1. Syfte
4.2. Ändra storleken på en bild (Skala)
4.3. Gör JPEG-bilder mindre
4.4. Beskär en bild
4.5. Hitta information om din bild
4.6. Change the Mode
4.7. Vänd en bild
4.8. Rotera en bild
5. Hur man drar raka linjer
5.1. Syfte
5.2. Exempel

1. Grundläggande begrepp

Figur 3.1. Wilber, the GIMP mascot

Wilber, the GIMP mascot

The Wilber_Construction_Kit (in src/images/) allows you to give the mascot a different appearance. It is the work of Tuomas Kuosmanen (tigertATgimp.org).


This section provides a brief introduction to the basic concepts and terminology used in GIMP. The concepts presented here are explained in much greater depth elsewhere. With a few exceptions, we have avoided cluttering this section with a lot of links and cross-references: everything mentioned here is so high-level that you can easily locate it in the index.

Bilder

Images are the basic entities used by GIMP. Roughly speaking, an image corresponds to a single file, such as a TIFF or JPEG file. You can also think of an image as corresponding to a single display window, but this is not quite correct: it is possible to have multiple windows all displaying the same image. It is not possible to have a single window display more than one image, though, or for an image to have no window displaying it.

A GIMP image may be quite a complicated thing. Instead of thinking of it as something like a sheet of paper with a picture on it, think of it as more like a book, whose pages are called layers. In addition to a stack of layers, a GIMP image may contain a selection mask, a set of channels, and a set of paths. In fact, GIMP provides a mechanism for attaching arbitrary pieces of data, called parasites, to an image.

In GIMP, it is possible to have many images open at the same time. Although large images may use many megabytes of memory, GIMP uses a sophisticated tile-based memory management system that allows GIMP to handle very large images gracefully. There are limits, however, and having more memory available may improve system performance.

Lager

If an image is like a book, then a layer is like a page within the book. The simplest images contain only a single layer, and can be treated like single sheets of paper. Sophisticated GIMP users often deal with images containing many layers, even dozens of them. Layers need not be opaque, and they need not cover the entire extent of an image, so when you look at an image's display, you may see more than just the top layer: you may see elements of many layers.

Kanaler

In GIMP, Channels are the smallest units of subdivision in the stack of layers from which the image is constructed. Every Channel in a layer has exactly the same size as the layer to which it belongs, and, consequently consists of the same number of pixels. Every pixel can be regarded as a container which can be filled with a value ranging from 0 to 255.The exact meaning of this value depends on the type of channel, e.g. in the RGB color model the value in the R-channel means the amount of red which is added to the color of the different pixels, in the selection channel, the value denotes how strongly the pixels are selected, and in the alpha channel the values denote how transparent the corresponding pixels are.

Markeringar

Often when modify an image, you only want a part of the image to be affected. The selection mechanism makes this possible. Each image has its own selection, which you normally see as a moving dashed line separating the selected parts from the unselected parts (the so-called marching ants ). Actually this is a bit misleading: selection in GIMP is graded, not all-or-nothing, and really the selection is represented by a full-fledged grayscale channel. The dashed line that you normally see is simply a contour line at the 50%-selected level. At any time, though, you can visualize the selection channel in all its glorious detail by toggling the QuickMask button.

A large component of learning how to use GIMP effectively is acquiring the art of making good selections—selections that contain exactly what you need and nothing more. Because selection-handling is so centrally important, GIMP provides many tools for doing it: an assortment of selection-making tools, a menu of selection operations, and the ability to switch to Quick Mask mode, in which you can treat the selection channel as though it were a color channel, thereby painting the selection.

Ångra

När du gör misstag, kan du ångra dessa. Nästa allt du gör på en bild kan man göra ogjord. Du kan faktiskt ångra en avsevärd stort antal saker du gjort, om du tycker att de var snedsteg. GIMP gör detta möjligt genom ha en historik över dina handlingar. Den historik slukar dock minne så möjligheten att ångra är inte oändlig. Vissa handlingar använder väldigt lite av ångringsminnet, dessa kan du göra dussintals av innan den tidigaste försvinner från minnet; andra handlingar kräver massor av ångringsminne. Du konfigurera storleken på som GIMP medger för ångringshistorik för varje bild, men i de flesta situationer kan du alltid åtminstone är 2-3 av de senaste handlingarna. ( Den viktigaste handlingen som inte är möjlig att ångra är att stänga bilden. Av den orsaken ber GIMP dig att bekräfta om du verkligen vill stänga ner bilden efter som du gjort ändringar i denna.)

Insticksmoduler

Many, probably most, of the things that you do to an image in GIMP are done by the GIMP application itself. However, GIMP also makes extensive use of plug-ins, which are external programs that interact very closely with GIMP, and are capable of manipulating images and other GIMP objects in very sophisticated ways. Many important plug-ins are bundled with GIMP, but there are also many available by other means. In fact, writing plug-ins (and scripts) is the easiest way for people not on the GIMP development team to add new capabilities to GIMP.

Alla kommandon i filtermenyn, och ett avsevärt antal andra kommandon i andra menyer, är egentligen implementerade som insticksmoduler.

Skript

In addition to plug-ins, which are programs written in the C language, GIMP can also make use of scripts. The largest number of existing scripts are written in a language called Script-Fu, which is unique to GIMP (for those who care, it is a dialect of the Lisp-like language called Scheme). It is also possible to write GIMP scripts in Python or Perl. These languages are more flexible and powerful than Script-Fu; their disadvantage is that they depend on software that does not automatically come packaged with GIMP, so they are not guaranteed to work correctly in every GIMP installation.