1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3                       "http://www.docbook.org/xml/4.3/docbookx.dtd">
4<!-- section history:
5  2017-09-09 j.h update v2.10
6-->
7<sect2 id="gimp-image-crop">
8  <title>Crop Image</title>
9
10  <indexterm>
11    <primary>Image</primary>
12    <secondary>Crop</secondary>
13    <tertiary>To selection</tertiary>
14  </indexterm>
15  <indexterm>
16    <primary>Crop to selection</primary>
17  </indexterm>
18
19  <indexterm>
20    <primary>Image</primary>
21    <secondary>Crop</secondary>
22    <tertiary>To content</tertiary>
23  </indexterm>
24  <indexterm>
25    <primary>Crop to content</primary>
26  </indexterm>
27
28  <para>
29    You can crop image in two ways:
30    <itemizedlist>
31      <listitem>
32        <para>
33          Crop to selection
34        </para>
35      </listitem>
36      <listitem>
37        <para>
38          Crop to content
39        </para>
40      </listitem>
41    </itemizedlist>
42  </para>
43
44  <sect3 id="crop-image-to-selection">
45    <title>Crop to selection</title>
46    <para>
47      The <guimenuitem>Crop to Selection</guimenuitem> command crops the image
48      to the boundary of the selection by removing any strips at the edges
49      whose contents are all completely unselected. Areas which are
50      partially selected (for example, by feathering) are not cropped. If
51      the selection has been feathered, cropping is performed on the
52      external limit of the feathered area. If there is no selection for
53      the image, the menu entry is disabled and grayed out.
54    </para>
55    <note>
56      <para>
57        This command crops all of the image layers. To crop the active layer
58        only, use the <link linkend="crop-layer-to-selection">Crop to
59        selection</link> command.
60      </para>
61    </note>
62  </sect3>
63
64  <sect3 id="crop-image-to-content">
65    <title>Crop to content</title>
66    <para>
67      Before GIMP-2.10, this command was named <quote>Autocrop image</quote>.
68      The <guimenuitem>Crop to content</guimenuitem> command removes the
69      borders from an image. It searches the active layer for the largest
70      possible border area that is all the same color, and then crops this
71      area from the image, as if you had used the
72      <link linkend="gimp-tool-crop">Crop</link> tool.
73    </para>
74    <caution>
75      <para>
76        Note carefully that this command only uses the
77        <emphasis>active layer</emphasis> of the image to find borders.
78        Other layers are cropped according to the same limits as limits in
79        the active layer.
80      </para>
81    </caution>
82    <figure>
83      <title><quote>Crop to content</quote> example</title>
84      <mediaobject>
85        <imageobject>
86          <imagedata format="PNG"
87            fileref="images/menus/image/autocrop-1.png"/>
88        </imageobject>
89        <caption>
90          <para>
91            This image is made of three layers. One with a red square,
92            another with a green square; both on a yellow semi-transparent
93            background. The green layer is active.
94          </para>
95        </caption>
96      </mediaobject>
97      <mediaobject>
98        <imageobject>
99          <imagedata format="PNG"
100            fileref="images/menus/image/autocrop-2.png"/>
101        </imageobject>
102        <caption>
103          <para>
104            <quote>Crop to content</quote> has cropped the green square and
105            made a layer from it. The other layers have been cropped to the
106            same size as the green one. Only a small part of the red square has
107            been kept.
108          </para>
109        </caption>
110      </mediaobject>
111    </figure>
112  </sect3>
113
114  <sect3>
115    <title>Activate the command</title>
116    <itemizedlist>
117      <listitem>
118        <para>
119          You can access this command on the image menu bar through
120          <menuchoice>
121            <guimenu>Image</guimenu>
122            <guimenuitem>Crop to Selection</guimenuitem>
123          </menuchoice>.
124        </para>
125      </listitem>
126    </itemizedlist>
127  </sect3>
128</sect2>
129