ACC SHELL
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 16. Manipulating Graphics with GIMP</title><link rel="stylesheet" href="susebooks.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Documentation"><link rel="up" href="part.graphics.html" title="Part V. Graphics"><link rel="prev" href="part.graphics.html" title="Part V. Graphics"><link rel="next" href="cha.digicam.html" title="Chapter 17. Managing Your Digital Image Collection with DigiKam"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header" border="0" class="bctable"><tr><td width="80%"><div class="breadcrumbs"><p><a href="index.html"> Documentation</a><span class="breadcrumbs-sep"> > </span><a href="book.apps.html">Application Guide</a><span class="breadcrumbs-sep"> > </span><a href="part.graphics.html">Graphics</a><span class="breadcrumbs-sep"> > </span><strong><a accesskey="p" title="Part V. Graphics" href="part.graphics.html"><span>◀</span></a> <a accesskey="n" title="Chapter 17. Managing Your Digital Image Collection with DigiKam" href="cha.digicam.html"><span>▶</span></a></strong></p></div></td></tr></table></div><div class="chapter" title="Chapter 16. Manipulating Graphics with GIMP"><div class="titlepage"><div><div><h2 class="title"><a name="cha.gimp"></a>Chapter 16. Manipulating Graphics with GIMP<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#cha.gimp">¶</a></span></h2></div></div></div><div class="toc"><p><b>Contents</b></p><dl><dt><span class="sect1"><a href="cha.gimp.html#sec.gimp.graphics">16.1. Graphics Formats</a></span></dt><dt><span class="sect1"><a href="cha.gimp.html#sec.gimp.starting">16.2. Starting GIMP</a></span></dt><dt><span class="sect1"><a href="cha.gimp.html#sec.gimp.getstart">16.3. Getting Started</a></span></dt><dt><span class="sect1"><a href="cha.gimp.html#sec.gimp.saving">16.4. Saving Images</a></span></dt><dt><span class="sect1"><a href="cha.gimp.html#sec.gimp.basics">16.5. Editing Images</a></span></dt><dt><span class="sect1"><a href="cha.gimp.html#sec.gimp.printing">16.6. Printing Images</a></span></dt><dt><span class="sect1"><a href="cha.gimp.html#sec.gimp.moreinfo">16.7. For More Information</a></span></dt></dl></div><a class="indexterm" name="idx.gimp"></a><a class="indexterm" name="idx.graphics.editing"></a><a class="indexterm" name="id541005"></a><div class="abstract" title="Abstract"><p class="title"><b>Abstract</b></p><p>
GIMP (<span class="emphasis"><em>the GNU Image Manipulation Program</em></span>) is a
program for creating and editing raster graphics. In most aspects, its
features are comparable to those of Adobe Photoshop and other commercial
programs. Use it to resize and retouch photographs, design graphics for
Web pages, create covers for your custom CDs, or almost any other
graphics project. It meets the needs of both amateurs and professionals.
</p></div><p>
Like many other Linux programs, GIMP is developed as a cooperative effort
of developers worldwide who volunteer their time and code to the project.
The program is under constant development, so the version included in your
system may vary slightly from the version discussed here. The layout of
the individual windows and window sections is especially likely to vary.
</p><p>
GIMP is an extremely complex program. Only a small range of features,
tools, and menu items are discussed in this chapter. See
<a class="xref" href="cha.gimp.html#sec.gimp.moreinfo" title="16.7. For More Information">Section 16.7, “For More Information”</a> for ideas of where to find more
information about the program.
</p><div class="sect1" title="16.1. Graphics Formats"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.gimp.graphics"></a>16.1. Graphics Formats<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.graphics">¶</a></span></h2></div></div></div><a class="indexterm" name="id541060"></a><a class="indexterm" name="id541072"></a><p>
There are two main types of graphics—raster and vector. GIMP is
intended for working with raster graphics, which is the normal format for
digital photographs or scanned images. A raster image is a collection of
pixels—small blocks of color that together create the entire image.
High resolution images contain a large number of pixels and image files can
easily become quite large because of this. It is also not possible to
increase the size of a pixel image without losing quality. GIMP supports
all the common formats of raster graphics, like JPEG, PNG, GIF, BMP,
TIFF, and more.
</p><p>
Unlike raster graphics, vector graphics do not store information for all
individual pixels. Instead, it uses geometrical primitives such as
points, lines, curves, and polygons. Vector images can be scaled very
easily and image files can be smaller. The disadvantage of vector graphics
is that it is not good at representing complex images with many different
colors such as photographs. There are many specialized applications for
vector graphics, for example Inkscape. GIMP has only a very limited
support for vector graphics. For example, GIMP can open and rasterize
vector graphics in SVG format or work with vector paths.
</p><p>
GIMP 2.6 still supports only limited selection of color spaces. It
supports indexed images and grayscale or RGB images with 8 bits per
channel (24 bits per pixel in RGB images without alpha channel). Many
high-end digital cameras can produce image files with higher color
depths. If you import such an image to GIMP, you will lose some color
information.
</p></div><div class="sect1" title="16.2. Starting GIMP"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.gimp.starting"></a>16.2. Starting GIMP<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.starting">¶</a></span></h2></div></div></div><a class="indexterm" name="id541119"></a><p>
Start GIMP from the main menu. Alternatively, enter <span class="command"><strong>gimp
&</strong></span> in a command line.
</p><div class="sect2" title="16.2.1. The Default Windows"><div class="titlepage"><div><div><h3 class="title"><a name="sec.gimp.starting.defaultwin"></a>16.2.1. The Default Windows<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.starting.defaultwin">¶</a></span></h3></div></div></div><p>
Three windows appear by default. The toolbox, an empty image window with
the main GIMP menu, and a window containing several docked dialogs. They
can be arranged on the screen and, except the toolbox and the last image
window, closed if no longer needed. Closing the toolbox or the last
image window closes the application. In the default configuration,
GIMP saves your window layout when you exit. Dialogs left open reappear
when you next start the program.
</p><div class="sect3" title="16.2.1.1. The Image Window"><div class="titlepage"><div><div><h4 class="title"><a name="sec.gimp.getstart.imagewin"></a>16.2.1.1. The Image Window<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.getstart.imagewin">¶</a></span></h4></div></div></div><p>
Every new, opened, or scanned image appears in its own window. If there
is more than one open image, each image has its own image window. There
is always at least one image window open. If there is currently no
image open, the image window is empty, containing only the main GIMP
menu and drop area, which can be used to open any file by dragging and
dropping it there. Closing the last image window exits the application.
</p><p>
The menu bar in the top of the window provides access to all image
functions. Conversely, access the menu by right-clicking the image or
clicking the small arrow button in the left corner of the rulers.
</p><p>
The <span class="guimenu">File</span> menu offers the standard file operations,
such as <span class="guimenu">New</span>, <span class="guimenu">Open</span>,
<span class="guimenu">Save</span>, <span class="guimenu">Print</span> and
<span class="guimenu">Close</span>. <span class="guimenu">Quit</span> exits the
application.
</p><p>
<a class="indexterm" name="id541210"></a>
With the items in the <span class="guimenu">View</span> menu, control the display
of the image and the image window. <span class="guimenu">New View</span> opens a
second display window of the current image. Changes made in one view
are reflected in all other views of that image. Alternate views are
useful for magnifying a part of an image for manipulation while seeing
the complete image in another view. Adjust the magnification level of
the current window with <span class="guimenu">Zoom</span>. When <span class="guimenu">Fit
Image in Window</span> is selected, the image window is resized to
fit the current image display exactly.
</p></div><div class="sect3" title="16.2.1.2. The Toolbox"><div class="titlepage"><div><div><h4 class="title"><a name="sec.gimp.starting.defaultwin.toolbox"></a>16.2.1.2. The Toolbox<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.starting.defaultwin.toolbox">¶</a></span></h4></div></div></div><p>
The toolbox contains important controls of the application. Closing it
exits the application. At the very top, there is a drop area which can
be used to open any image file by simply dragging and dropping it
there. Below that, find icons for the various tools. Hover the mouse
over an icon to display information about it.
</p><div class="figure"><a name="fig.gimp.toolbox"></a><p class="title"><b>Figure 16.1. The Toolbox</b><span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#fig.gimp.toolbox">¶</a></span></p><div class="figure-contents"><div class="mediaobject"><table border="0" summary="manufactured viewport for HTML img" cellspacing="0" cellpadding="0" width="25%"><tr><td><img src="images/gimp-toolbox.png" width="100%" alt="The Toolbox"></td></tr></table></div></div></div><br class="figure-break"><p>
The current foreground and background color are shown in two
overlapping boxes. The default colors are black for the foreground and
white for the background. Click the box to open a color selection
dialog. Swap the foreground and background color with the bent arrow
symbol to the upper right of the boxes. Use the black and white symbol
to the lower left to reset the colors to the default.
</p><p>
Under the toolbox, a dialog shows options for the currently selected
tool. If it is not visible, open it by double-clicking the tool's icon
in the toolbox.
</p></div><div class="sect3" title="16.2.1.3. Layers, Channels, Paths, Undo"><div class="titlepage"><div><div><h4 class="title"><a name="sec.gimp.starting.defaultwin.lcpu"></a>16.2.1.3. Layers, Channels, Paths, Undo<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.starting.defaultwin.lcpu">¶</a></span></h4></div></div></div><p>
In the first section, use the drop-down box to select the image to
which the tabs refer. By clicking <span class="guimenu">Auto</span>, control
whether the active image is chosen automatically. By default,
<span class="guimenu">Auto</span> is enabled.
</p><p>
<span class="guimenu">Layers</span> shows the different layers in the current
images and can be used to manipulate the layers. Information is
available in <a class="xref" href="cha.gimp.html#sec.gimp.advanced.layers" title="16.5.6. Layers">Section 16.5.6, “Layers”</a>.
<span class="guimenu">Channels</span> shows and can manipulate the color channels
of the image.
</p><p>
Paths are a vector-based method of selecting parts of an image. They
can also be used for drawing. <span class="guimenu">Paths</span> shows the paths
available for an image and provides access to path functions.
<span class="guimenu">Undo</span> shows a limited history of modifications made
to the current image. Its use is described in
<a class="xref" href="cha.gimp.html#sec.gimp.basics.undo" title="16.5.5. Undoing Mistakes">Section 16.5.5, “Undoing Mistakes”</a>.
</p></div></div></div><div class="sect1" title="16.3. Getting Started"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.gimp.getstart"></a>16.3. Getting Started<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.getstart">¶</a></span></h2></div></div></div><p>
Although GIMP can be a bit overwhelming for new users, most quickly find
it easy to use once they work out a few basics. Crucial basic functions
are creating, opening, and saving images.
</p><div class="sect2" title="16.3.1. Creating a New Image"><div class="titlepage"><div><div><h3 class="title"><a name="sec.gimp.getstart.creating"></a>16.3.1. Creating a New Image<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.getstart.creating">¶</a></span></h3></div></div></div><a class="indexterm" name="id541404"></a><p>
To create a new image, select <span class="guimenu">File</span>+<span class="guimenu">New</span> or press <span class="keycap">Ctrl</span>+<span class="keycap">N</span>. This opens a dialog
in which to make settings for the new image. If desired, select a
predefined setting called a <span class="guimenu">Template</span>.
<a class="indexterm" name="id541442"></a>
To create a custom template, select <span class="guimenu">Windows</span>+<span class="guimenu">Dockable Dialogs</span>+<span class="guimenu">Templates</span> and use the controls offered
by the window that opens.
</p><p>
In the <span class="guimenu">Image Size</span> section, set the size of the image
to create in pixels or another unit. Click the unit to select another
unit from the list of available units. The ratio between pixels and a
unit is set in <span class="guimenu">Resolution</span>, which appears when the
<span class="guimenu">Advanced Options</span> section is opened. A resolution of
72 pixels per inch corresponds to common screen display. It is
sufficient for Web page graphics. A higher resolution should be used for
print images. For most printers, a resolution of 300 pixels per inch
results in an acceptable quality.
</p><p>
In <span class="guimenu">Color space</span>, select whether the image should be in
color (<span class="guimenu">RGB</span>) or <span class="guimenu">Grayscale</span>. For
detailed information about image types, see
<a class="xref" href="cha.gimp.html#sec.gimp.advanced.modes" title="16.5.7. Image Modes">Section 16.5.7, “Image Modes”</a>. In <span class="guimenu">Fill
With</span> select the color the image is filled with. You can choose
between <span class="guimenu">Foreground Color</span> and <span class="guimenu">Background
Color</span> set in the toolbox, <span class="guimenu">White</span> or
<span class="guimenu">Transparency</span> for a transparent image. Transparency is
represented by a gray checkerboard pattern. You can enter a comment for
the new image in <span class="guimenu">Comment</span>.
</p><p>
When the settings meet your needs, press <span class="guimenu">OK</span>. To
restore the default settings, press <span class="guimenu">Reset</span>. Pressing
<span class="guimenu">Cancel</span> aborts creation of a new image.
</p></div><div class="sect2" title="16.3.2. Opening an Existing Image"><div class="titlepage"><div><div><h3 class="title"><a name="sec.gimp.getstart.open"></a>16.3.2. Opening an Existing Image<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.getstart.open">¶</a></span></h3></div></div></div><a class="indexterm" name="id541563"></a><p>
To open an existing image, select <span class="guimenu">File</span>+<span class="guimenu">Open</span> or press <span class="keycap">Ctrl</span>+<span class="keycap">O</span>. In the dialog that
opens, select the desired file. You can also press <span class="keycap">Ctrl</span>+<span class="keycap">L</span> and type directly the
path to the desired image. Then click <span class="guimenu">Open</span> to open
the selected image or press <span class="guimenu">Cancel</span> to skip opening an
image.
</p></div><div class="sect2" title="16.3.3. Scanning an Image"><div class="titlepage"><div><div><h3 class="title"><a name="sec.gimp.getstart.scan"></a>16.3.3. Scanning an Image<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.getstart.scan">¶</a></span></h3></div></div></div><a class="indexterm" name="id541624"></a><p>
Instead of opening an existing image or creating a new one, you can scan
one. To scan directly from GIMP, make sure that the package
<code class="systemitem">xsane</code> is installed. To open the scanning
dialog, select <span class="guimenu">File</span>+<span class="guimenu">Create</span>+<span class="guimenu">XSane: Device dialog</span>.
</p><p>
Create a preview when the object to scan is smaller than the total
scanning area. Press <span class="guimenu">Acquire preview</span> in the
<span class="guimenu">Preview</span> dialog to create a preview. If you want to
scan only part of the area, select the desired rectangular part with the
mouse.
</p><p>
In the <span class="guimenu">xsane</span> dialog, select whether to scan a binary
(black and white without shades of gray), grayscale, or color image and
the required scan resolution. The higher the resolution you choose, the
better is the quality of the scanned image. However, this also results
in a correspondingly larger file and the scanning process can take a
very long time at higher resolutions. The size of the final image (both
in pixels and bytes) is shown in the lower part of the dialog.
</p><p>
In the <span class="guimenu">xsane</span> dialog, use the sliders to set desired
gamma, brightness, and contrast values. These sliders are not available
in binary mode. Changes are visible in the preview immediately. Once all
settings have been made, click <span class="guimenu">Scan</span> to scan the
image.
</p></div></div><div class="sect1" title="16.4. Saving Images"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.gimp.saving"></a>16.4. Saving Images<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.saving">¶</a></span></h2></div></div></div><a class="indexterm" name="id541709"></a><p>
No image function is as important as <span class="guimenu">File</span>+<span class="guimenu">Save</span>. It is better to save too often than
too rarely. Use <span class="guimenu">File</span>+<span class="guimenu">Save
as</span> to save the image with a new filename. It is a
good idea to save image stages under different names or make backups in
another directory so you can easily restore a previous state.
</p><p>
When saving for the first time or using <span class="guimenu">Save as</span>, a
dialog opens in which to specify the filename and type. Enter the
filename in the field at the top. For <span class="guimenu">Save in folder</span>,
select the directory in which to save the file from a list of commonly
used directories. To use a different directory or create a new one, open
<span class="guimenu">Browse for other folders</span>. It is recommended to leave
<span class="guimenu">Select File Type</span> set to <span class="guimenu">By
Extension</span>. With that setting, GIMP determines the file type
based on the extension appended to the filename. The following file types
are frequently useful:
</p><div class="variablelist"><dl><dt><span class="term">XCF<a class="indexterm" name="id541778"></a>
<a class="indexterm" name="id541789"></a>
</span></dt><dd><p>
This is the native format of the application. It saves all layer and
path information along with the image itself. Even if you need an
image in another format, it is usually a good idea to save a copy as
XCF to simplify future modifications. Information about layers is
available in <a class="xref" href="cha.gimp.html#sec.gimp.advanced.layers" title="16.5.6. Layers">Section 16.5.6, “Layers”</a>.
</p></dd><dt><span class="term">JPEG<a class="indexterm" name="id541826"></a>
</span></dt><dd><p>
JPG or JPEG is a common format for photographs and Web page graphics
without transparency. Its compression method enables reduction of file
sizes, but information is lost when compressing. It may be a good idea
to use the preview option when adjusting the compression level. Levels
of 85% to 75% often result in an acceptable image quality with
reasonable compression. Saving a backup in a lossless format, like
XCF, is also recommended. If editing an image, save only the finished
image as JPG. Repeatedly loading a JPG then saving can quickly result
in poor image quality.
</p></dd><dt><span class="term">GIF<a class="indexterm" name="id541861"></a>
</span></dt><dd><p>
Although very popular in the past for graphics with transparency, GIF
is less often used now because of license issues. GIF is also used for
animated images. The format can only save <span class="emphasis"><em>indexed</em></span>
images. See <a class="xref" href="cha.gimp.html#sec.gimp.advanced.modes" title="16.5.7. Image Modes">Section 16.5.7, “Image Modes”</a> for information
about indexed images. The file size can often be quite small if only a
few colors are used.
</p></dd><dt><span class="term">PNG<a class="indexterm" name="id541902"></a>
</span></dt><dd><p>
With its support for transparency, lossless compression, free
availability, and increasing browser support, PNG is replacing GIF as
the preferred format for Web graphics with transparency. An added
advantage is that PNG offers partial transparency, which is not
offered by GIF. This enables smoother transitions from colored areas
to transparent areas (<span class="emphasis"><em>antialiasing</em></span>).
</p></dd></dl></div><p>
To save an image in the chosen format, press <span class="guimenu">Save</span>. To
abort, press <span class="guimenu">Cancel</span>. If the image has features that
cannot be saved in the chosen format, a dialog appears with choices for
resolving the situation. Choosing <span class="guimenu">Export</span>, if offered,
normally gives the desired results. A window then opens with the options
of the format. Reasonable default values are provided.
</p></div><div class="sect1" title="16.5. Editing Images"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.gimp.basics"></a>16.5. Editing Images<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics">¶</a></span></h2></div></div></div><a class="indexterm" name="idx.gimp.editing_images"></a><p>
GIMP provides a number of tools for making changes to images. The
functions described here are those most interesting for home users.
</p><div class="sect2" title="16.5.1. Changing the Image Size"><div class="titlepage"><div><div><h3 class="title"><a name="sec.gimp.basics.size"></a>16.5.1. Changing the Image Size<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics.size">¶</a></span></h3></div></div></div><a class="indexterm" name="idx.graphics.resizing"></a><p>
Once an image is scanned or a digital photograph is loaded from the
camera, it is often necessary to modify the size for display on a Web
page or for printing. Images can easily be made smaller either by
scaling them down or by cutting off parts of them. Enlarging an image is
much more problematic. Because of the nature of raster graphics, quality
is lost when an image is enlarged. It is recommended to keep a copy of
your original image before scaling or cropping.
</p><div class="sect3" title="16.5.1.1. Cropping an Image"><div class="titlepage"><div><div><h4 class="title"><a name="sec.gimp.basics.size.cropping"></a>16.5.1.1. Cropping an Image<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics.size.cropping">¶</a></span></h4></div></div></div><a class="indexterm" name="id542029"></a><p>
Cropping an image works like cutting the edges off a piece of paper.
Select the crop tool from the toolbox (it resembles a scalpel) or with
<span class="guimenu">Tools</span>+<span class="guimenu">Transform
Tools</span>+<span class="guimenu">Crop</span>. Click a starting
corner and drag to outline the area to keep.
</p><p>
A rectangle showing the crop area will appear. To adjust the size of
the rectangle, move your mouse pointer above any of the rectangle's
sides or corners, click and drag to resize as desired. If you want to
adjust both width and height of the rectangle, use a corner. To adjust
only one dimension, use a side. To move the whole rectangle to a
different position without resizing, click anywhere near its center and
drag to the desired position.
</p><p>
When you are satisfied with the crop area, click anywhere inside to
crop the image or press <span class="keycap">Enter</span>. To cancel the cropping,
click anywhere outside the crop area.
</p><p>
Advanced options for the crop tool are available in the <span class="guimenu">Tool
Options</span> dialog.
</p></div><div class="sect3" title="16.5.1.2. Scaling an Image"><div class="titlepage"><div><div><h4 class="title"><a name="sec.gimp.basics.size.scaling"></a>16.5.1.2. Scaling an Image<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics.size.scaling">¶</a></span></h4></div></div></div><a class="indexterm" name="id542094"></a><p>
Select <span class="guimenu">Image</span>+<span class="guimenu">Scale
Image</span> to change the overall size of an image.
Select the new size by entering it in <span class="guimenu">Width</span> or
<span class="guimenu">Height</span>. To change the proportions of the image when
scaling (this distorts the image), click the chain icon to the right of
the fields to break the link between them. When those fields are
linked, all values are changed proportionately. Adjust the resolution
with <span class="guimenu">X resolution</span> and <span class="guimenu">Y
resolution</span>.
</p><p>
The <span class="guimenu">Interpolation</span> option controls the quality of the
resulting image. The default <span class="guimenu">Cubic</span> interpolation
method is a good standard to use in most cases.
</p><p>
When finished adjusting the size, press <span class="guimenu">Scale</span> to
scale the image. <span class="guimenu">Reset</span> restores the original values.
<span class="guimenu">Cancel</span> aborts the procedure.
</p></div><div class="sect3" title="16.5.1.3. Changing the Canvas Size"><div class="titlepage"><div><div><h4 class="title"><a name="sec.gimp.basics.size.canvas"></a>16.5.1.3. Changing the Canvas Size<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics.size.canvas">¶</a></span></h4></div></div></div><p>
Changing the canvas size is like putting a mat around an image. Even if
the mat is smaller, the rest of the image is there, but you can only
see part of it. If the mat is larger, you see the original image with
extra space around it. To do this, select <span class="guimenu">Image</span>+<span class="guimenu">Canvas Size</span>.
</p><p>
In the dialog that opens, enter the new size. By default, the width and
height maintain the same proportions as the current image. To change
this, click the chain icon.
</p><p>
After adjusting the size, determine how the existing image should be
positioned in comparison to the new size. Use the
<span class="guimenu">Offset</span> values or drag the box inside the frame at
the bottom. When satisfied with the changes, click
<span class="guimenu">Resize</span> to change the canvas size. Click
<span class="guimenu">Reset</span> to restore the original values or
<span class="guimenu">Cancel</span> to cancel the canvas resize.
</p><a class="indexterm" name="id542216"></a></div></div><div class="sect2" title="16.5.2. Selecting Parts of Images"><div class="titlepage"><div><div><h3 class="title"><a name="sec.gimp.basics.select"></a>16.5.2. Selecting Parts of Images<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics.select">¶</a></span></h3></div></div></div><a class="indexterm" name="idx.gimp.selecting"></a><p>
It is often useful to perform an image operation on only part of an
image. To do this, the part of the image with which to work must be
selected. Areas can be selected using the select tools available in the
toolbox, using the quick mask, or combining different options.
Selections can also be modified with the items under
<span class="guimenu">Select</span>. The selection is outlined with a dashed line,
called <span class="emphasis"><em>marching ants</em></span>.
</p><div class="sect3" title="16.5.2.1. Using the Selection Tools"><div class="titlepage"><div><div><h4 class="title"><a name="sec.gimp.basics.select.tools"></a>16.5.2.1. Using the Selection Tools<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics.select.tools">¶</a></span></h4></div></div></div><p>
The main selection tools are rather easy to use. The paths tool, which
can also be used for more than selecting, is more complicated so is not
described here. In the tool options for the other selection tools, use
one of the icons in the <span class="guimenu">Mode</span> row to determine
whether the selection should replace, be added to, be subtracted from,
or intersect with an existing selection.
</p><div class="variablelist"><dl><dt><span class="term">Rect Select</span></dt><dd><p>
This tool can be used to select rectangular or square areas. To
select an area with a fixed aspect ratio, width, height or size,
activate the <span class="guimenu">Fixed</span> option and choose the relevant
mode in the <span class="guimenu">Tool Options</span> dialog. To create a
square, hold <span class="keycap">Shift</span> while selecting a region.
</p></dd><dt><span class="term">Ellipse Select</span></dt><dd><p>
Use this to select elliptical or circular areas. The same options
are available as with the rectangular selection. To create a circle,
hold <span class="keycap">Shift</span> while selecting a region.
</p></dd><dt><span class="term">Free Select (Lasso)</span></dt><dd><p>
With this tool, you can create a selection based on a combination of
freehand drawing and polygonal segments. To draw a freehand line,
drag the mouse over the image with the left mouse button pressed. To
create a polygonal segment, release the mouse button where the
segment should start and press it again where the segment should
end. To complete the selection, hover the pointer above the starting
point and click inside the circle.
</p></dd><dt><span class="term">Fuzzy Select (Magic Wand)</span></dt><dd><p>
This tools selects a continuous region based on color similarities.
Set the maximum difference between colors in the tool options dialog
in <span class="guimenu">Threshold</span>. By default, the selection is based
only on the active layer. To base the selection on all visible
layers, check <span class="guimenu">Sample merged</span>.
</p></dd><dt><span class="term">Select by Color</span></dt><dd><p>
With this, select all the pixels in the image with the same or
similar color as the clicked pixel. The maximum difference between
colors can be set in the tool options dialog in
<span class="guimenu">Threshold</span>. The important difference between this
tool and Fuzzy Select is that Fuzzy Select works on continuous color
areas while Select by Color selects all pixels with similar colors
in the whole image regardless of their position.
</p></dd><dt><span class="term">Intelligent Scissors</span></dt><dd><p>
Click a series of points in the image. As you click, the points are
connected based on color differences. Click on the first point to
close the area. Convert it to a regular selection by clicking inside
it.
</p></dd><dt><span class="term">Foreground Selection Tool</span></dt><dd><p>
The Foreground Selection tool lets you semiautomatically select an
object in a photograph with minimal manual effort.
</p></dd></dl></div><p>
If you want to use the Foreground Selection tool, follow these steps:
</p><div class="procedure"><a name="sec.gimp.basics.select.fs"></a><ol class="procedure" type="1"><li><p>
Activate the Foreground Selection tool by clicking on its icon in the
Toolbox or choosing <span class="guimenu">Tools</span>+<span class="guimenu">Selection Tools</span>+<span class="guimenu">Foreground
Select</span> from the menu.
</p></li><li><p>
Roughly select the foreground object you want to extract. Select as
little as possible from the background but include the whole object.
At this point, the tool works like the Fuzzy Select tool.
</p><p>
When you release the mouse button, the non selected part of the image
is covered with dark blue mask.
</p></li><li><p>
Draw a continuous line through the foreground object going over
colors which will be kept for the extraction. Do not paint over
background pixels.
</p><p>
When you release the mouse button, all background is covered with
dark blue mask. If parts of the object are also masked, paint over
them. The mask will adapt.
</p></li><li><p>
When you are satisfied with the mask, press
<span class="keycap">Enter</span>. The mask will be converted
to a new selection.
</p></li></ol></div></div><div class="sect3" title="16.5.2.2. Using the Quick Mask"><div class="titlepage"><div><div><h4 class="title"><a name="sec.gimp.basics.select.quickmask"></a>16.5.2.2. Using the Quick Mask<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics.select.quickmask">¶</a></span></h4></div></div></div><a class="indexterm" name="id542535"></a><p>
The quick mask is a way of selecting parts of an image using the paint
tools. A good way to use it is to make a rough selection using the
intelligent scissors or the lasso (the free selection tool). Then
activate the quick mask by pressing the small icon with the dashed box
in the lower left corner.
</p><p>
The quick mask displays the selection using an overlay of red. Areas
shaded with red are not selected. Areas appearing as they did before
the mask was activated are selected. To modify the selection, use the
paint tools. Painting with white selects the painted pixels. Painting
with black deselects pixels. Shades of gray (colors are treated as
shades of gray) are a partial selection. Partial selection allows
smooth transitions between selected and unselected areas.
</p><p>
To use a different color for displaying the quick mask, right-click the
quick mask button then select <span class="guimenu">Configure Color and
Opacity</span> from the menu. Click the colored box in the dialog
that opens in order to select a new color.
</p><p>
After using the paint tools to adjust the selection as desired, convert
from the quick mask view back to the normal selection view by clicking
the icon in the lower left corner of the image window (currently
displaying a red box). The selection is again displayed with the
marching ants.
</p><a class="indexterm" name="id542575"></a></div></div><div class="sect2" title="16.5.3. Applying and Removing Color"><div class="titlepage"><div><div><h3 class="title"><a name="sec.gimp.basics.color"></a>16.5.3. Applying and Removing Color<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics.color">¶</a></span></h3></div></div></div><p>
Most image editing involves applying or removing color. By selecting a
part of the image, limit where color can be applied or removed. When you
select a tool and move the cursor onto an image, the cursor's appearance
changes to reflect the chosen tool. With many tools, an icon of the
current tool is shown along with the arrow. For paint tools, an outline
of the current brush is shown, allowing you to see exactly where you
will be painting in the image and how large of an area will be painted.
</p><div class="sect3" title="16.5.3.1. Selecting Colors"><div class="titlepage"><div><div><h4 class="title"><a name="sec.gimp.basics.color.selecting"></a>16.5.3.1. Selecting Colors<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics.color.selecting">¶</a></span></h4></div></div></div><a class="indexterm" name="id542613"></a><p>
Paint tools use the foreground color. To select the color, first click
the display box of the foreground color in the Toolbox. A dialog with
five tabs opens. These tabs provide different color selection methods.
Only the first tab, shown in
<a class="xref" href="cha.gimp.html#fig.gimp.colorselector" title="Figure 16.2. The Basic Color Selector Dialog">Figure 16.2, “The Basic Color Selector Dialog”</a>, is described here. The
new color is shown in <span class="guimenu">Current</span>. The previous color is
shown in <span class="guimenu">Old</span>.
</p><div class="figure"><a name="fig.gimp.colorselector"></a><p class="title"><b>Figure 16.2. The Basic Color Selector Dialog</b><span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#fig.gimp.colorselector">¶</a></span></p><div class="figure-contents"><div class="mediaobject"><table border="0" summary="manufactured viewport for HTML img" cellspacing="0" cellpadding="0" width="60%"><tr><td><img src="images/gimp-color.png" width="100%" alt="The Basic Color Selector Dialog"></td></tr></table></div></div></div><br class="figure-break"><p>
The easiest way to select a color is by using the colored areas in the
boxes to the left. In the narrow vertical bar, click a color similar to
the desired color. The larger box to the left then shows available
nuances. Click the desired color. It is then shown in
<span class="guimenu">Current</span>. If that color is not what you want, try
again.
</p><p>
The arrow button to the right of <span class="guimenu">Current</span> enables the
saving of a number of possible colors. Click the arrow to copy the
current color to the history. A color can then be selected by clicking
it in the history. A color can also be selected by directly entering
its hexadecimal color code in <span class="guimenu">HTML Notation</span>.
</p><p>
The color selector defaults to selecting a color by hue, which is
usually easiest for a new user. To select by saturation, value, red,
green, or blue, select the corresponding radio button to the right. The
sliders and number fields can also be used to modify the currently
selected color. Experiment a bit to find out what works best for you.
</p><p>
When the desired color is shown in <span class="guimenu">Current</span>, click
<span class="guimenu">OK</span>. To restore the original values shown when the
dialog was opened, click <span class="guimenu">Reset</span>. To abort changing
the color, click <span class="guimenu">Cancel</span>.
</p><p>
To select a color that already exists in your image, use the eye
dropper tool. With the tool options, set whether the foreground or
background color should be selected. Then click a point in the image
that shows the desired color. When the color is right, click
<span class="guimenu">Close</span> to close the tool's dialog.
</p></div><div class="sect3" title="16.5.3.2. Painting and Erasing"><div class="titlepage"><div><div><h4 class="title"><a name="sec.gimp.basics.color.painting"></a>16.5.3.2. Painting and Erasing<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics.color.painting">¶</a></span></h4></div></div></div><p>
To paint and erase, use the tools from the toolbox. There are a number
of options available to fine-tune each tool. Pressure sensitivity
options apply only when a pressure-sensitive graphics tablet is used.
</p><p>
The pencil, brush, airbrush, and eraser work much like their real-life
equivalents. The ink tool works like a calligraphy pen. Paint by
clicking and dragging. The bucket fill is a method of coloring areas of
an image. It fills based on color boundaries in the image. Adjusting
the threshold modifies its sensitivity to color changes.
</p></div><div class="sect3" title="16.5.3.3. Adding Text"><div class="titlepage"><div><div><h4 class="title"><a name="sec.gimp.basics.color.text"></a>16.5.3.3. Adding Text<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics.color.text">¶</a></span></h4></div></div></div><a class="indexterm" name="id542782"></a><p>
With the text tool, easily add text to an image. With the tool options,
select the desired font, font size, color, justification, indent, and
line spacing. Then click a starting point in the image. A small dialog
opens in which to enter your text. Enter single or multiple lines of
text then press <span class="guimenu">Close</span>.
</p><p>
The text tool creates text in a special layer. To work with the image
after adding text, read
<a class="xref" href="cha.gimp.html#sec.gimp.advanced.layers" title="16.5.6. Layers">Section 16.5.6, “Layers”</a>. When the text layer
is active, it is possible to modify the text by clicking in the image
to reopen the entry dialog. Change the settings by modifying the tool
options.
</p></div><div class="sect3" title="16.5.3.4. Retouching Images—The Clone Tool"><div class="titlepage"><div><div><h4 class="title"><a name="sec.gimp.basics.color.clone"></a>16.5.3.4. Retouching Images—The Clone Tool<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics.color.clone">¶</a></span></h4></div></div></div><a class="indexterm" name="id542825"></a><p>
The clone tool is ideal for retouching images. It enables you to paint
in an image using information from another part of the image. If
desired, it can instead take information from a pattern.
</p><p>
When retouching, it is usually a good idea to use a small brush with
soft edges. In this way, the modifications can blend better with the
original image.
</p><p>
To select the source point in the image, press and hold
<span class="keycap">Ctrl</span> while clicking the desired source point. Then
paint with the tool, as usual. When you move the cursor while painting,
the source point, marked by a cross, moves as well. If the
<span class="guimenu">Alignment</span> is set to <span class="guimenu">None</span> (the
default setting), the source resets to the original when you release
the left mouse button.
</p></div></div><div class="sect2" title="16.5.4. Adjusting Color Levels"><div class="titlepage"><div><div><h3 class="title"><a name="sec.gimp.basics.levels"></a>16.5.4. Adjusting Color Levels<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics.levels">¶</a></span></h3></div></div></div><a class="indexterm" name="id542876"></a><p>
Images often need a little adjusting to get ideal print or display
results. In many programs designed for inexperienced users, the
brightness and contrast levels are modified. This can work and is also
available in GIMP, but better results can be obtained by adjusting the
color levels.
</p><p>
To do this, select <span class="guimenu">Colors</span>+<span class="guimenu">Levels</span>. A dialog opens for controlling
the levels in the image. Good results can usually be obtained by
clicking <span class="guimenu">Auto</span>. To make manual adjustments to all
channels, use the dropper tools in <span class="guimenu">All Channels</span> to
pick areas in the image that should be black, neutral gray, and white.
</p><p>
To modify a channel individually, select the desired channel in
<span class="guimenu">Channel</span>. Then drag the black, white, and middle
markers in the slider in <span class="guimenu">Input Levels</span>. Conversely,
use the dropper tools to select points in the image that should serve as
the white, black, and gray points for that channel.
</p><p>
If <span class="guimenu">Preview</span> is checked, the image window shows a
preview of the image with the modifications applied. When the desired
result is achieved, press <span class="guimenu">OK</span> to apply the changes.
With <span class="guimenu">Reset</span>, restore the original settings.
<span class="guimenu">Cancel</span> aborts level adjustment.
</p></div><div class="sect2" title="16.5.5. Undoing Mistakes"><div class="titlepage"><div><div><h3 class="title"><a name="sec.gimp.basics.undo"></a>16.5.5. Undoing Mistakes<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.basics.undo">¶</a></span></h3></div></div></div><a class="indexterm" name="id542960"></a><p>
Most modifications made in GIMP can be undone. To view a history of
modifications, use the undo dialog included in the default window layout
or open one from the image window menu with <span class="guimenu">Windows</span>+<span class="guimenu">Dockable Dialogs</span>+<span class="guimenu">Undo History</span>.
</p><p>
The dialog shows a base image and a series of editing changes that can
be undone. Use the buttons to undo and redo changes. In this way, you
can work back to the base image. If you undo a modification then make a
new one, the undone modification cannot be redone.
</p><p>
Changes can also be undone and redone with the <span class="guimenu">Edit</span>
menu. Alternatively, use the shortcuts <span class="keycap">Ctrl</span>+<span class="keycap">Z</span> and <span class="keycap">Ctrl</span>+<span class="keycap">Y</span>.
</p></div><div class="sect2" title="16.5.6. Layers"><div class="titlepage"><div><div><h3 class="title"><a name="sec.gimp.advanced.layers"></a>16.5.6. Layers<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.advanced.layers">¶</a></span></h3></div></div></div><a class="indexterm" name="id543033"></a><p>
Layers are a very important aspect of GIMP. By drawing parts of your
image on separate layers, you can change, move, or delete those parts without
damaging the rest of the image. To understand how layers work, imagine
an image created from a stack of transparent sheets. Different parts of
the image are drawn on different sheets. The stack can be rearranged,
changing which parts are on top. Individual layers or groups of layers
can shift position, moving sections of the image to other locations. New
sheets can be added and others set aside.
</p><p>
Use the <span class="guimenu">Layers</span> dialog to view the available layers of
an image. The text tool automatically creates special text layers when
used. The active layer is highlighted. The buttons at the bottom of the
dialog offer a number of functions. More are available in the menu
opened when a layer is right-clicked in the dialog. The two icon spaces
before the image name are used for toggling image visibility (eye icon
when visible) and for linking layers. Linked layers are marked with the
chain icon and moved as a group.
</p></div><div class="sect2" title="16.5.7. Image Modes"><div class="titlepage"><div><div><h3 class="title"><a name="sec.gimp.advanced.modes"></a>16.5.7. Image Modes<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.advanced.modes">¶</a></span></h3></div></div></div><a class="indexterm" name="id543075"></a><p>
GIMP has three image modes—RGB, Grayscale, and Indexed. RGB is a
normal color mode and is the best mode for editing most images.
Grayscale is used for black-and-white images. Indexed limits the colors
in the image to a set number. It is mainly used for GIF images. If you
need an indexed image, it is normally best to edit the image in RGB then
convert to indexed right before saving. If you save to a format that
requires an indexed image, GIMP offers to index the image when saving.
</p></div><div class="sect2" title="16.5.8. Special Effects"><div class="titlepage"><div><div><h3 class="title"><a name="sec.gimp.advanced.effects"></a>16.5.8. Special Effects<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.advanced.effects">¶</a></span></h3></div></div></div><a class="indexterm" name="id543106"></a><p>
GIMP includes a wide range of filters and scripts for enhancing images,
adding special effects to them or making artistic manipulations. They
are available in <span class="guimenu">Filters</span>. Experimenting is the best
way to find out what is available.
</p><a class="indexterm" name="id543126"></a></div></div><div class="sect1" title="16.6. Printing Images"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.gimp.printing"></a>16.6. Printing Images<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.printing">¶</a></span></h2></div></div></div><a class="indexterm" name="id543147"></a><a class="indexterm" name="id543159"></a><p>
To print an image, select <span class="guimenu">File</span>+<span class="guimenu">Print</span> from the image menu. If your
printer is configured in the system, it should appear in the list. You
can configure printing options on <span class="guimenu">Page Setup</span> and
<span class="guimenu">Image Settings</span> tabs.
</p><div class="figure"><a name="fig.gimp.print"></a><p class="title"><b>Figure 16.3. The Print Dialog</b><span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#fig.gimp.print">¶</a></span></p><div class="figure-contents"><div class="mediaobject"><table border="0" summary="manufactured viewport for HTML img" cellspacing="0" cellpadding="0" width="75%"><tr><td><img src="images/gimp-print.png" width="100%" alt="The Print Dialog"></td></tr></table></div></div></div><br class="figure-break"><p>
When satisfied with the settings, press <span class="guimenu">Print</span>.
<span class="guimenu">Cancel</span> aborts printing.
</p></div><div class="sect1" title="16.7. For More Information"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec.gimp.moreinfo"></a>16.7. For More Information<span class="permalink"><a alt="Permalink" title="Copy Permalink" href="#sec.gimp.moreinfo">¶</a></span></h2></div></div></div><p>
The following resources are very useful for users of GIMP. They contain
much more information about GIMP than this chapter. If you want to use
GIMP for more advanced tasks, you should not miss these resources.
</p><div class="itemizedlist"><ul class="itemizedlist" type="bullet"><li class="listitem" style="list-style-type: disc"><p>
<a class="ulink" href="http://www.gimp.org" target="_top">http://www.gimp.org</a> is the official home page of The
GIMP. News about GIMP and related software are regularly posted on the
frontpage.
</p></li><li class="listitem" style="list-style-type: disc"><p>
<span class="guimenu">Help</span> provides access to the internal help system
including extensive GIMP User Manual. The package
<code class="systemitem">gimp-help</code> has to be
installed. This documentation is also available online in HTML and PDF
formats at <a class="ulink" href="http://docs.gimp.org" target="_top">http://docs.gimp.org</a>. Translations into
many languages are available.
</p></li><li class="listitem" style="list-style-type: disc"><p>
A collection of many interesting GIMP tutorials is maintained at
<a class="ulink" href="http://gimp.org/tutorials/" target="_top">http://gimp.org/tutorials/</a>. It contains basic
tutorials for complete beginners as well as tutorials for advanced or
expert users.
</p></li><li class="listitem" style="list-style-type: disc"><p>
Various interesting information about GIMP can be found on the Wilber's
Wiki at <a class="ulink" href="http://wiki.gimp.org/gimp/" target="_top">http://wiki.gimp.org/gimp/</a>.
</p></li><li class="listitem" style="list-style-type: disc"><p>
Printed books about GIMP are published regularly. You will find a
selection of the best ones with short annotations at
<a class="ulink" href="http://gimp.org/books/" target="_top">http://gimp.org/books/</a>.
</p></li><li class="listitem" style="list-style-type: disc"><p>
GIMP functionality can be extended with scripts and plug-ins. Many such
scripts and plug-ins are distributed in the GIMP package, but others can be
downloaded from the Internet. At
<a class="ulink" href="http://registry.gimp.org/" target="_top">http://registry.gimp.org/</a>, you will find a database of
GIMP scripts and plug-ins.
</p></li></ul></div><p>
You can also use mailing lists or IRC channels to ask questions about
GIMP. Please always try to find answers in the documentation mentioned
above or in mailing list archives before asking your question. The time
of experienced users present on GIMP lists and channels is limited. Be
polite and patient. It may take some time before your question is
answered.
</p><div class="itemizedlist"><ul class="itemizedlist" type="bullet"><li class="listitem" style="list-style-type: disc"><p>
There are a number of mailing lists about GIMP. You will find them at
<a class="ulink" href="http://gimp.org/mail_lists.html" target="_top">http://gimp.org/mail_lists.html</a>. GIMP User list is
the most appropriate place to ask user questions. If you do not want to
subscribe to the list but want to read its archives, visit
<a class="ulink" href="http://lists.xcf.berkeley.edu/lists/gimp-user/" target="_top">http://lists.xcf.berkeley.edu/lists/gimp-user/</a>.
</p></li><li class="listitem" style="list-style-type: disc"><p>
There is a whole IRC network dedicated to GIMP and GNOME desktop
environment—GIMPNet. You can connect to GIMPNet with your
favorite IRC client by pointing it at the irc.gimp.org server. The
#gimp-users channel is the right place to ask question about using
GIMP. If you want to listen to developer's discussions, join the #gimp
channel.
</p></li></ul></div><a class="indexterm" name="id543408"></a><a class="indexterm" name="id543415"></a></div></div><div class="navfooter"><table width="100%" summary="Navigation footer" border="0" class="bctable"><tr><td width="80%"><div class="breadcrumbs"><p><a href="index.html"> Documentation</a><span class="breadcrumbs-sep"> > </span><a href="book.apps.html">Application Guide</a><span class="breadcrumbs-sep"> > </span><a href="part.graphics.html">Graphics</a><span class="breadcrumbs-sep"> > </span><strong><a accesskey="p" title="Part V. Graphics" href="part.graphics.html"><span>◀</span></a> <a accesskey="n" title="Chapter 17. Managing Your Digital Image Collection with DigiKam" href="cha.digicam.html"><span>▶</span></a></strong></p></div></td></tr></table></div></body></html>
ACC SHELL 2018