目录
本节简要介绍GIMP中使用的基本概念和术语。这里介绍的概念在别处有更深入的解释。除了少数例外,我们避免了大量链接和交叉引用使本节变得混乱:这里提到的所有内容都非常高级,您可以轻松地在索引中找到它。
图像是GIMP使用的基本实体。粗略地说,一个“图像”对应一个单一的文件,例如一个 TIFF 或 JPEG 文件。您还可以将图像视为对应于单个显示窗口(尽管实际上可以让多个窗口都显示相同的图像)。即,一个窗口不可能显示多个图像,或者一个图像没有窗口来显示。
一个GIMP图像可能是一个相当复杂的东西。与其把它想象成一张上面有图片的纸,不如把它想象成一堆纸,称为“图层”。除了一堆图层之外,GIMP图像还可能包含一个选择蒙版、一组通道和一组路径。事实上,GIMP提供了一种将任意数据片段(称为“寄生虫”)附加到图像的机制。
在GIMP中,可以同时打开多个图像。尽管大图像可能使用数兆字节的内存,但GIMP使用复杂的基于图块的内存管理系统,允许GIMP优雅地处理非常大的图像。但是,仍存在限制,拥有更多可用内存可能会提高系统性能。
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. For more info see Introduction to Layers.
数字图像由方形像素网格组成。每张图像都有一个在两个维度上测量的大小,例如 900 像素宽 x 600 像素高。但是像素在物理空间中没有固定的大小。为了设置要打印的图像,我们使用一个称为分辨率的值,定义为图像大小(以像素为单位)与其在纸上打印时的物理尺寸(通常以英寸为单位)之间的比率。大多数文件格式(但不是全部)都可以保存这个值,表示为ppi—每英寸像素数。
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 900×600 pixel image may be printed as a small 3×2" card with barely noticeable pixels—or as a large poster with large, chunky pixels.
从相机和移动设备导入的图像往往具有附加到文件的分辨率。分辨率通常为 72 或 96 ppi。重要的是要认识到,这个分辨率是武断的,是出于历史原因而选择的。您可以随时使用GIMP更改分辨率—这对实际图像像素没有影响。此外,对于在线显示图像、移动设备、电视或视频游戏等用途—简而言之,任何非打印用途—分辨率的值毫无意义,并被忽略。相反,图像通常显示为每个图像像素符合一个屏幕像素。
通道是像素颜色的单个分量。对于GIMP中的彩色像素,这些分量通常是红色、绿色、蓝色,有时有透明度 (Alpha)。对于灰阶图像,它们是灰色和Alpha;对于索引彩色图像,它们是索引和Alpha。
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.
显示图像时,GIMP将这些分量放在一起以形成屏幕、打印机或其他输出设备的像素颜色。某些输出设备可能使用不同的红色、绿色和蓝色分量。如果是这样,当显示图像时,GIMP的通道将转换为适合设备的通道。
当您处理需要以一种特定颜色进行调整的图像时,通道会很有用。例如,如果您想从照片中去除“红眼”,您可以使用红色通道。
您可以将通道视为允许或限制通道所代表颜色输出的蒙版。通过对通道信息使用过滤器,您可以在图像上创建许多不同且微妙的效果。在颜色通道上使用过滤器的一个简单示例是通道混合器过滤器。
除了这些通道之外,GIMP还允许您创建其他通道(或更准确地说,通道蒙版),这些通道显示在通道对话框的下部。您可以创建一个新通道或保存选区为一个通道(蒙版)。有关通道蒙版的更多信息,请参阅蒙版上的词汇表条目 。
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 Quick Mask 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”. For more information, see also The Selection.
When you make mistakes, you can undo them. Nearly everything you can do to an image is undoable. In fact, you can usually undo a substantial number of the most recent things you did, if you decide that they were misguided. GIMP makes this possible by keeping a history of your actions. This history consumes memory, though, so undoability is not infinite. Some actions use very little undo memory, so that you can do dozens of them before the earliest ones are deleted from this history; other types of actions require massive amounts of undo memory.
You can configure the amount of memory GIMP allows for the undo history of each image, but in any situation, you should always be able to undo at least your 2-3 most recent actions. The most important action that is not undoable is closing an image. For this reason, GIMP asks you to confirm that you really want to close the image if you have made any changes to it. For more information, see also Undoing.
A lot of the things that you do to an image in GIMP are done by GIMP 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.
滤镜菜单中的所有命令、以及其他菜单中的大量命令,实际上都是作为插件实现的。
In addition to plug-ins, GIMP can also make use of scripts. 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). In the past there was a clear distinction between scripts and plug-ins, but that is disappearing. Depending on which Script-Fu interpreter you use, Scheme scripts can also be installed as plug-ins.