GIMP Basic Function - Edit and View
GIMP Basic Function - Edit and View
PASTE INTO
Right-click|Edit|Paste Into is a very useful command when you
want to insert an image into a defined shape in another image. To use it, you first
need to copy or cut the image you want to paste. Then, you make a selection shape
in the target image (if you use a little feather, you’ll get wonderfully soft edges to
your selection). Choose Paste Into and the image you copied will appear inside the
selection. Click on the Move tool and you can place the selection exactly where
you want it, before you anchor it by clicking elsewhere on the image.
Note: The named buffer only exists as long as your Gimp session. If you want to
save a selection more permanently, you need to save it in a separate layer in your
image.
The option Replace Current Selection allows you to replace a non-floating
selection in the image with a selection from your list. Replace Current Selection
unchecked gives the same result as Paste Into, if you already have a selection in
the image. If you try to use this option with a floating selection, the float will be
anchored to the image. The selection from your list will turn into a new float in the
same place as the old one.
You can also delete a selection from the list if you no longer need it.
Figure 9.2 These images were created using Cut, Copy and Paste Named.
COPY VISIBLE
Right-click|Edit|Copy Visible will copy all visible layers to a flat
copy which you can paste into a new image. It’s like executing both Copy and
Merge visible layers at the same time. This function is quite handy when you
don’t want to alter the original layers, but only work with a quick copy. The copy
can then be pasted into a new image.
MULTISELECT
The right-click|View|Multiselect function is used to break up an
image into several smaller images. This is ideal for preparing your work for being
published on the Internet, since web graphics are often cut up in a grid system to
make them fit in an HTML table. Before invoking the Multiselect command, you
must prepare the image by dragging guides (See “Rulers And Guides” on page
151) to the exact position where you want the image to be partitioned off.
When you apply the Multiselect command, the sections indicated by the guides
will be selected and copied into new images. As with the Paste as New Image
function, all layers and layer attributes are also copied. A layered image cannot be
save as a JPEG file, so if you are designing for the Web, we recommend that you
flatten the image (merge all layers) before applying Multiselect. This saves you
the trouble of flattening all of the small Multiselect images separately.
CLEAR
Right-click|Edit|Clear is a powerful command that cuts without saving
what you cut away. Used in a layer, it will delete everything and leave an empty,
transparent layer. Used on a selection, it will delete or cut everything inside of it,
leaving only the “marching ants.” Used on a non-alpha background, it will delete
all background information, and leave only the background color that you see in
the toolbox’s background color swatch. If your image has an alpha channel (see
“Alpha Channels” on page 353), the background layer will become transparent.
FILL
Right-click|Edit|Fill is the equivalent of the Bucket Fill with a max-
imum fill threshold. It’s not as sophisticated as the Bucket Fill, but it’s quick, easy
and efficient. Note that this command always uses the background color in the
toolbox color swatch, whereas the Bucket Fill uses the foreground color.
STROKE
Right-click|Edit|Stroke creates a colored edge around the selection.
This edge, or contour, is based on what brush you’re using and what brush options
you have set in the Brush Selection dialog. Stroke can be used for creating
simple drawings from selection shapes, or for manipulating selection edges by
using Stroke with different artistic brushes and different settings for Spacing,
Mode and Opacity.
ZOOM
If the Magnify tool is active, you can click in an image to zoom in, and
Shift+click to zoom out. To zoom a specific part of the image, drag diag-
onally across that part (draw a rectangle), and release the mouse button.
You can also pan a zoomed image by clicking and dragging on the image with the
middle mouse button.
Even if the Magnify tool is not active, you can zoom with the right-click|
View|Zoom in and right-click|View|Zoom out commands. The
default keyboard hotkeys are - (the minus sign or hyphen) for Zoom out and =
(the equal sign) for Zoom in. Since Gimp supports dynamic key bindings,
you can change = to + (the plus sign), if you like that better. Pressing 1 on your
keyboard will return the view to 1:1 scale.
The right-click|View|Zoom command allows you to choose from nine
different zoom scales: 16:1, 8:1, 4:1, 2:1, 1:1, 1:2, 1:4, 1:8 and 1:16. 16:1 is the
lower limit and 1:16 is the upper limit for zooming in Gimp.
Pressing - zooms in smaller steps than zooming using the scales. In other words,
to display your image in a scale of 1:3, press - three times.
MAGNIFY OPTIONS
Allow Window Resizing means that the canvas size will always adapt to the
amount of zoom you use, so you’ll always be able to see the entire image regard-
less of zoom level. If you don’t want to use this option, you can press Ctrl+e for
Shrink Wrap, which will also adjust the canvas to the image size.
RULERS
At the top and left sides of the image frame, you’ll see the Gimp rulers. As you
drag the cursor over an image, a horizontal and a vertical arrow will appear inside
the rulers, showing the current cursor position.
In Gimp, all images are measured in pixels by default, so the ruler unit is pixels.
You can change the ruler unit to millimeters or inches by editing [Link]|
gimprc file (see “Gimp Start Flags And rcfiles” starting on page 785).
However, there is not much point in doing so, because in Gimp v.1.0 you can’t set
image resolution and canvas size the way you can in Photoshop. Size (and there-
fore resolution) for a printed image is determined by the Print dialog or Save as
(Postscript) dialog (see “Printing Images” on page 96 and “PostScript And EPS”
on page 91). The reason for this is that Gimp is hard coded to handle all images in
72 ppi (dpi) which is the default for things like web images, but is quite insuffi-
cient for printing.
GUIDES
Horizontal and vertical guides can be dragged straight from the left or top rulers.
You can easily adapt the size, shape and position of a selection to the guides by
drawing it within the frame of two vertical and two horizontal guides.
You can also use the guides to set the exact point of origin from which you want
a selection to start. If you press the Ctrl key and start dragging close enough to
the point where the guides cross, that spot will be the center of the new selection.
Without Ctrl, the selection will start from the cross and continue in the direction
you drag.
To change the position of a guide, use the Move tool. Notice how the move cur-
sor symbol changes into a pointing hand when it touches a guide, and that the
guides will change color from blue to red when they are touched.
NEW VIEW
The right-click|View|New View command opens a new window that
displays the same image you’re currently working on. This enables you to watch
your creation from several windows, each with different focus and zoom if you so
desire. However, it is still the same picture, and the changes you make will appear
in all of the New View windows. If you want to try out different versions of your
image, press Ctrl+d to Duplicate. Unlike New View, duplicate windows are sep-
arate, changeable copies of your original image. Changes made in one window
won’t appear in the other windows.
SHRINK WRAP
Right-click|View|Shrink Wrap will cause the canvas size to expand
or shrink based on your zoom, so you’ll be able to see the entire image regardless
of zoom level. If you want this to happen automatically every time you change the
zoom level, click on Allow Window Resizing in the Magnify tool options
dialog (double-click on the Magnify tool to display the Magnify tool options dialog).
WINDOW INFO
The Window Info dialog (right-click|View|Window Info) dis-
plays up-to-date information on the active window, such as Dimensions, Scale
Ratio and Display Type.
Note that this option only works for the normal (empty) selections you make with
a selection tool. You can never move a floating selection using the Alt key.
This option allows you to use the selection as a template: You can move the selec-
tion around and fill it every time you move it. Note that the Move tool or a selec-
tion tool must be active for this technique to work.
Hints
The Move tool has an extra feature that allows you to nudge (move in small, pre-
cise increments) a floating selection or a layer with the keyboard’s arrow keys
when the Move tool is active. Pressing the Shift key as you press the arrow keys
will increase the length of these steps. To nudge an empty selection, press the Alt
key and the arrow keys.
Note that when you make multiple selects, Gimp treats them as a unit. That
means that you can’t move one selection closer to another with the Move tool,
because all of the selected areas will move together as one.
Press the Crop button in the toolbox, or click inside the markings, and the portion
of the image inside the cropmarks will be your new image.
ROTATE
When you’re transforming using Rotation, you drag the mouse to rotate the
selection. Note that parts of the image will end up outside the drawable area, so
you may have to resize the image afterward.
As you use the mouse to rotate the image, the rotation angle will be displayed
in a small dialog box. You can’t insert numbers into the dialog; it just displays how
much you’ve rotated the image (this is not a very precise tool). However, you can
press the Ctrl key and drag on the image with your mouse, which makes the
selection rotate in 15 degree increments.
If you want to rotate a layer or image 90 or 270 degrees (for example, if you
scanned an image in portrait mode and you want landscape) the right-click|
Image|Transforms|Rotate option is a better choice.
If you need to specify the exact rotation angle, use the right-click|Layers|
Transforms|Rotate Any Angle option. Note that you can’t get exact
values by just dragging the slide bar in the Rotate Any Angle dialog. Click the
mouse button to the left or right of the slider to change the angle in one degree
increments for every click.
SCALE
Choose Scaling from the Transform Tool Options dialog and then click on the
image to see the Scaling Information dialog. The Scaling Information dialog pro-
vides you with information on both the Original Height and Original Width
of the selection, as well as the Current Width and Current Height.
Drag on the image with your mouse to scale the image. The X Scale Ratio and
Y Scale Ratio tell you how much you’ve altered the size and proportions of the
original image.
The Ctrl key locks the scale’s X axis, so you can only affect the height of the
image. Shift locks the Y axis, so you can only affect the width of the image.
Ctrl+Shift forces the image to scale proportionally.
SHEARING
Shearing will deform an image in either the horizontal or the vertical plane. In
other words, it will turn a rectangle into a parallelogram.
Click on the Shearing option in the Transform Tool Options dialog, then click on
your image to see the Shear Information dialog. Shear your image by click-
ing and dragging on the corners. Dragging up and down shears in the Y direction,
and dragging on the sides shears in the X direction. You can shear along either of
the X or Y axes, but only on one at a time. In other words, if the X Shear Magni-
tude is other than zero, then the Y Shear Magnitude must be zero.
Tip: If you want to shear a selection both ways, you have to change to another tool
icon, and then return to Transform.
PERSPECTIVE
The last option on the Transform Tool Options dialog is Perspective. The term
perspective isn’t quite accurate, because no actual perspective transformation
takes place (making the image small in the far end and large in the other).
It is better described as a distortive effect, since you can move all four displace-
ment points (the corners) independently. You can certainly make a rectangular
selection look like a perspective, but you have to do that manually.
Observe that you can turn the “perspective” inside out if you like. If you let the
lines of the perspective square cross or top each other, you’ll mirror and wrench
the selection so much it will eventually become unrecognizable.
Transform Smoothing
On the Transform Tool Options dialog, the Smoothing checkbox provides an
antialiasing option, which will make distorted edges look better. If you don’t
use Smoothing, your selection might turn out very rough and pixly on the edges.
On the other hand, the Smoothing option can make edges very blurry, so you
should take that into consideration as well.
OPTIONS
At the top of the Text tool dialog, the current Text Size is shown in either pix-
els or points (you can choose which you prefer from the pull-down menu). A
pixel is the smallest component in a bitmap image, and all measures in pixels
depend on the screen resolution. A point, however, is a fixed value — one inch
is the same as 72 points.
Points are used to measure fonts. For example, 12 points is the standard size of
body text in most word processing programs.
Standard screen resolution is often 72 pixels per inch, in which case text in pixels
will be the same size as text measured in points. However, on a high-resolution
screen, such as one with a resolution of 90 pixels per inch, setting the text to points
will render a larger text than setting the text to pixels. For example, there are 90
pixels for every 72 points, so a text size of 50 points will be 63 pixels wide,
because there are 1.25 pixels for every point.
Antialiasing is an effect used to smooth edges in bitmapped images. It is often
used on artistic text, because it softens the jaggies (the jagged pixel edges of the
letter’s curves in low resolution). It will blur the edge pixels to transparency. This
will make curves look smoother, but the edges will become unsharp and less dis-
tinctive.
The Font list displays all fonts installed on the local X server. Click the name
of a font to change the text in the text box. Note that some of the more unusual
fonts (such as Chinese or Japanese fonts) may bring X to a near-crashing halt sim-
ply because so many characters are involved. As a rule, be careful using fonts with
Asian names, or avoid them entirely. To learn how to install new fonts, read “How
To Get Fonts To Gimp” starting on page 759.
FONT PARAMETERS
There are eight font parameters (Foundry, Weight, Slant, Set width, Spac-
ing, Registry, Encoding and Border) in the Text Tool dialog box.
Foundry
Foundry refers to the origin of your font (usually the manufacturer). This param-
eter has to distinguish different fonts with the same name that are from different
companies. This is important, because many different versions of well-known
fonts exist and you need to specify which one you mean if you have several ver-
sions installed.
Weight
Weight shows what typographic “blackness” options you have for the font you
have chosen (black, bold, demibold, medium and regular). Options that aren’t
available for the chosen font are grayed out.
Slant
Slant is the “posture” option. The letter r (Roman) signifies upright posture. The
letters i (italic) or o (oblique) are two different slanted postures. i produces a
good representation of the letters and o gives a simpler, more jagged italic type.
The available posture depends on the font.
Set Width
This is an option if your font includes the built-in possibility of modifying the hor-
izontal width. Sometimes, the same font will come in wider and narrower ver-
sions, typically called black, semi-condensed and narrow.
Spacing
Spacing displays what types of built-in spacing your font allows: c for character
cell, m for monospaced and p for proportional. The c and m fonts are
mainly for programmers and are used in terminal display windows. In these fonts,
every character takes up the same amount of space. The proportional fonts are
what you might consider to be “normal” typographical fonts, because they are not
constrained to a fixed width. Each character can take up a different amount of
space.
Border
The Border option will increase the size of the text layer that is created when you
press the New Layer button or double-click the Floating Selection icon bar
in the Layers & Channels dialog. Border is useful when you plan to put your text
in a text layer, and feel that you’d like some extra space around the letters.
As you may know, when you place a floating selection in a layer of its own, Gimp
will optimize the layer size to be as small as possible. When you have placed the
text in a layer (click on the text layer’s icon bar to make it active), you’ll see a yel-
low-dotted rectangular box around your text. This is the layer border.
The default value, which is a border of zero pixels, fits text very snugly, whereas
larger borders increase the size of the layer. Change the Border parameter if you
need some space for kerning your letters by hand (adjusting the spacing between
the letters), or if you just want to move each letter around separately. If you find
that the layer size wasn’t large enough after all, you can always change it by using
Resize Layer in the Layers menu. More information on floating selections
and how to move letters is included in “Moving Objects In A Floating Selection
Layer” on page 332.
BRUSHES
The Brush Selection dialog is accessible from the toolbox (File|Dia-
logs|Brushes) or from right-click|Dialogs|Brushes.
The Brush Selection dialog displays all the available brushes. You may notice
some unusual brushes, like artistic text, little flourishes or doodles, etc. Such
brushes are not very difficult to make yourself. In this section, we’ll discuss how
to create a brush. First, however, we’ll take a look at the Brush Selection dialog.
Test one of the Circle brushes and set the spacing to 150. Your brush stroke
will now consist of a dotted line. The larger spacing makes it clear that the brush
shape is circular, but if you had used the default spacing, you wouldn’t be able to
see it.
Now, try a decorative brush like the Guitar pattern. Change the spacing value to
10 or less (mouse-click the Spacing slidebar and use the arrow keys to set exact
values) and see what happens. Normally, you’ll want to use low spacing values,
but when you paint with special brushes a bit of spacing can be useful.
PATTERNS
You can fill selections or backgrounds with a pattern instead of with a solid
color. Gimp includes many preset custom patterns. You can also find patterns at
many Gimp users’ home pages. If you’re interested in finding more patterns, look
through [Link] and/or search the web using
your favorite search engine for terms like gimp and patterns.
Click on right-click|Dialogs|Patterns to access the Pattern
Selection dialog. If you can’t see the whole pattern, click and hold on the pattern
square and the entire pattern will appear. Once you’ve clicked on a pattern, it is
selected. You can see the name of the selected pattern in the upper-left corner of
the dialog.
To use a selected pattern, double-click on the Fill tool icon to display the Bucket
Fill Options dialog. Under Fill Type, select Pattern Fill. Now you can click
on a selection to fill it with your selected pattern. You can also paint with patterns,
using the Clone tool, but you can’t use patterns with any other tools.
• First, check out what your present pattern will look like by opening
right-click|Filters|Map|Small Tiles. This filter is more
than useful when you create patterns, because it gives you a sneak preview
of what your pattern will look like, as well as the opportunity to modify it
(read more about this filter in “Small Tiles” on page 558).
• Open the Layers & Channels dialog box and duplicate the pattern
layer.
• Open the Offset dialog box and offset the top layer by x/2 and the
bottom layer by y/2. (This is not the same as offsetting the original image
with the Offset by (x/2),(y/2) button!)
Set the top layer in Multiply Mode (if the background color is other
than white, the pattern element must be created in a transparent layer on
top of the colored background layer), then flatten the image and take a
look at your pattern once again with the Small Tiles preview.
Figure 12.5 If you use Offset you will get a better pattern, as
you can see in the final outcome (right)
4. If you have created a more complex pattern or have used a photograph (for
example, a wood structure), you will also need to use the Offset option to
remove visible seams between tiles. This is described in more detail in
“Offset” on page 294. The right-click|Filters|Map|
Make Seamless filter is also a useful tool, but the result is often a bit
blurred (see “Make Seamless” on page 550 for more information about this
filter).
You can also take an existing pattern and change it. System patterns are in
usr/local/share/gimp/patterns (of course, this location varies,
depending on site setup).
5. When you’re satisfied with the tile, resize the image to fit the tile size of the
pattern you want to create. Use File|Save As to save the image as a PAT
file in the .gimp/patterns directory.
6. Click on right-click|Dialogs|Patterns to view the Pattern
Selection dialog. Press the Refresh button and your newly created pattern
will be available for use.
PALETTES
Use right-click|Dialogs|Palette or File|Dialogs|Palette
to display the Color Palette dialog.
PALETTE OPTIONS
Select New Palette from the Ops pull-down menu to create a new palette, and
name the new palette. The same pull-down menu allows you to refresh and delete
palettes. When you create a new palette, you always start with an empty (black)
palette.
To add a color to the new palette, use the Color Picker tool to select a color from
an image, or specify a color in the Color Selection dialog (open this dialog by
double-clicking in the foreground color swatch in the toolbox). The chosen color
is always visible as the foreground color in the toolbox. Press New to add this
color to your palette.
Edit a color in your palette by selecting it and pressing the Edit button, which will
open the Color Selection dialog (see “The Color Selection Dialog” on page 143).
You can delete a color by selecting it and pressing Delete.
As soon as you edit a system palette (any palette other than your personal pal-
ettes), it will move to your personal palette directory. You can’t delete a system
palette; Gimp will simply acknowledge that you don’t want to use it in this ses-
sion. However, if you delete a personal palette, it is gone forever.
Note that if you have added a large number of palettes to the palette directory, it
will take some time before they are all displayed in the pull-down menu.
Hints
Tip: Use palettes when you want to create images with a fixed number of colors,
for example, when you are creating icons.
If your screen depth is only 8 bit (256 colors), you’ll need to be concerned about
whether the created icons use up all 256 colors. If your icon manager reduces the
number of colors it may look awful. You’ll need to create a palette with a limited
number of basic colors for your icons and then create the icons using those colors.
The palette file format is similar to the format of the [Link] file used by the X Win-
dow System. Each color has a line for the RGB number values of the color and
then the name of the color. This means that you can edit palette files in an ordinary
text editor.
Gimp allows you to do even more complex blends with a tool called the Gradi-
ent Editor. The Gradient Editor comes with a number of preset custom gra-
dients, but you can also create your own gradients or edit one of the custom
gradients with this tool. The Gradient Editor is a flexible tool that can create very
advanced gradients.
To apply a gradient from the Gradient Editor you double-click on the Blend tool
icon in the toolbox and select Custom (from editor) from the Blend pull-
down menu in the Blend Tool Option dialog.
The custom gradients from the Gradient Editor can be very useful. You can use
them in advanced fountain fills or patterns, and you can also create objects with
them, like an eyeball, a hole or a pipe. For tips on how to make the best use of the
gradients in the Gradient Editor, read about the Blend tool, which is described in
“The Blend Tool Or Gradient Fill” on page 131.
Edited system gradients will be saved to your personal gradient directory (.gimp/
gradients). So if you want to use the original system gradient, and not the edited
copy, just delete or move the edited copy from your personal directory.
If you delete a system gradient, it just means that you don’t want to use it in this
session. However, as is the case with personal palettes, if you delete a personal
gradient it will be gone forever.
.
• If you move a white midpoint (by clicking and dragging on it), you will
see the color transition shift as the balance between the two end
colors is being changed.
• Dragging a black endpoint (not the ones to the extreme left or right,
because you can’t move them) will stretch the area between that
endpoint and the midpoint, making it wider or narrower. The stretch
limit is the next midpoint to the left or right.
• If you click on an endpoint, then press Shift and drag, you will
compress or expand the entire selection in the drag direction. This
deformation will also include the neighboring midpoint, which will move
along until you reach the next endpoint.
• You can extend or add to a selection by pressing the Shift key and
clicking on another segment.
Any of the described manipulations can be used on extended selections (more than
one segment).
The Load from and Save to menu options allow you to load a color from an
RGBA channel to an endpoint, or to save an existing endpoint color to one of the
preset RGBA channel swatches, so that you can load that color later.
The Load from command allows you to load some nice basic colors and trans-
parent backgrounds. The Save to option is useful if you want to use a particular
endpoint color in another part of the gradient.
Figure 12.10 The endpoint’s
Load from menu
Blending Functions
In the Blending function for segment submenu, you will find some func-
tions that control how the appearance of the gradient in your selection:
• Linear: This is the default function, and it causes the color to change at
a constant rate from one endpoint to another.
• Curved: Causes the end sections’ colors to change at a different “rate”
than the colors in the middle section. Think of it as a semi-circle where the
color changes more at the ends and less in the middle.
• Sinusoidal: This is the opposite of Curved, so the rate of change is slow
at the ends and fast in the middle.
• Spherical increasing: Causes the color change rate to be faster on the
left and slower on the right.
• Spherical decreasing: The opposite of spherical increasing; the color
change rate is slower on the left side and faster on the right side.
Coloring
The coloring type for segment submenu lets you choose a color model for
your selection or segment. You can choose Plain RGB and two kinds of HSV.
See “Color Models” starting on page 187 for more information on the different
color models.
Segments
The Segment commands will work on the selected segment. If you have selected
more than one segment, they will not be treated as a unit. Each segment will be
treated separately:
• Split segment at midpoint: Puts an endpoint at the midpoint and
then divides the two new segments with new midpoints.
• Split segment uniformly: Lets you specify how many splits you
want to make in the selected area.
• Delete segment: Deletes the entire selection, not just the segment you
press the right mouse button in.
• Re-center segment’s midpoint: Re-centers the midpoints in all of
the selected segments.
• Re-distribute handles in segment: Evenly distributes all the
points in the segment. This is useful if you have selected several segments
and want a smooth gradient in the selection.
Selection Operations
The Selection operations submenu allows you to flip or replicate the segment
and also allows you to blend the endpoints’ colors and/or opacity:
• Flip segment: Lets you flip or reverse a segment or selection. Flip can
be used to change the order of two segments. First, select two segments
and flip both together. Deselect one segment and flip the other one. Select
the first segment and flip that one, too. Now you have changed the order of
your segments. This can be done to more than two segments, and gives
you the freedom to change the structure of the gradients.
• Replicate: Provides a small dialog in which you can copy the selected
segment(s) as many times as you like. The copies will be squeezed into
the original segment’s space.
• Blend endpoints’ colors: Only works if you have selected more than
one segment. It will blend the color in the endpoints of the selection, and
will subsequently “merge” your segments so they blend gradually from
the selection’s left handle to the right handle, thus changing the color of
the endpoints inside the selection.
• Blend endpoints’ opacity: Works the same way as blending colors.
This command will create a soft transition from the opacity (transparency)
in the left endpoint to the opacity in the right endpoint of a multi-segment
selection.