Kapitola 3. First Steps with GIMP

Obsah

1. Základní myšlenky Gimpu
2. Hlavní okna GIMPu
2.1. Panel nástrojů
2.2. Okno obrázku
2.3. Dokování dialogů
3. Undoing
3.1. Nevratné operace
4. Common Tasks
4.1. Intention
4.2. Change the Size of an Image for the screen
4.3. Change the Size of an Image for print
4.4. Compressing Images
4.5. Crop An Image
4.6. Find Info About Your Image
4.7. Change the Mode
4.8. Flip An Image
4.9. Rotate An Image
4.10. Separating an Object From Its Background
5. How to Draw Straight Lines
5.1. Intention
5.2. Příklady

1. Základní myšlenky Gimpu

Obrázek 3.1. Wilber, the GIMP mascot

Wilber, the GIMP mascot

The Wilber Construction Kit (docs/Wilber_Construction_Kit.xcf.gz) 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.

Obrázky

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 (although in truth 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 a sheet of paper with a picture on it, think of it as more like a stack of sheets, 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.

Vrstvy

If a simple image can be compared to a single sheet of paper, an image with layers is likened to a sheaf of transparent papers stacked one on top of the other. You can draw on each paper, but still see the content of the other sheets through the transparent areas. You can also move one sheet in relation to the others. 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.

Resolution

Digital images consist of a grid of square pixels. Each image has a size measured in two dimensions, such as 900 pixels wide by 600 pixels high. But pixels don't have a set size in physical space. To set up an image for printing, we use a value called resolution, defined as the ratio between an image's size in pixels and its physical size (usually in inches) when it is printed on paper. Most file formats (but not all) can save this value, which is expressed as ppi—pixels per inch.

When printing a file, the resolution determines the size the image will have on paper, and as a result, the physical size of the pixels. The same 900x600 pixel image may be printed as a small 3x2" card with barely noticeable pixels—or as a large poster with large, chunky pixels.

Images imported from cameras and mobile devices tend to have a resolution attached to the file. The resolution is usually 72 or 96ppi. It is important to realize that this resolution is arbitrary and was chosen for historic reasons. You can always change the resolution with GIMP—this has no effect on the actual image pixels. Furthermore, for uses such as displaying images online, on mobile devices, television or video games—in short, any use that is not print—the resolution value is meaningless and is ignored. Instead, the image is usually displayed so that each image pixel conforms to one screen pixel.

Channels

Channels can be useful when you are working on an image which needs adjustment in one particular color. For example, if you want to remove red eye from a photograph, you might work on the Red channel.

The entire rectangular array of any one of the color components for all of the pixels in an image is also referred to as a Channel. You can see these color channels with the Channels dialog.

In addition to these channels, GIMP also allows you to create other channels (or more correctly, Channel Masks), which are displayed in the lower part of the Channels dialog. You can convert a selection to a channel mask by using the Save to Channel command. You can also create a channel by right-clicking in the Channels dialog and using the New channel command. See the glossary entry on Masks for more information about Channel Masks.

Clipboard

You can look at channels as masks which allow or restrict the output of the color that the channel represents. By using Filters on the channel information, you can create many varied and subtle effects on an image. A simple example of using a Filter on the color channels is the Channel Mixer filter.

In addition to these channels, GIMP also allows you to create other channels (or more correctly, Channel Masks), which are displayed in the lower part of the Channels dialog. You can create a New Channel or save a selection to a channel (mask). See the glossary entry on Masks for more information about Channel Masks.

Selections

Often when modifying 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.

Undoing

Když uděláte chybu, můžete ji vzít zpět. V podstatě cokoliv, co můžete s obrázkem provést, lze vzít zpět. Dokonce můžete obvykle vzít zpět celou řadu posledních změn. GIMP umožňuje rušení změn díky tomu, že si uchovává historii provedených akcí. Ukládání historie samozřejmě spotřebovává paměť, takže možnost vracet změny není nekonečná. Některé akce zabírají velmi málo historické paměti, takže jich můžete provést desítky, aniž by ta nejstarší zmizela z paměti. Jiné akce ale zabírají ohromné množství paměti. Množství paměti, které je k dispozici pro ukládání historie každého obrázku lze nastavit, ale v každém případě by mělo být možné vrátit alespoň 2-3 poslední změny. (Nejdůležitější změnou, kterou vzít zpět nelze, je zavření obrázku. Proto vás GIMP před uzavřením obrázku, ve kterém jsou neuložené změny, požádá o potvrzení vašeho úmyslu.)

Zásuvné moduly

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.

All of the commands in the Filters menu, and a substantial number of commands in other menus, are actually implemented as plug-ins.

Skripty

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.