~ubuntu-branches/ubuntu/maverick/gimp/maverick-updates

« back to all changes in this revision

Viewing changes to devel-docs/libgimp/xml/gimpimage.xml

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-12-09 19:44:52 UTC
  • Revision ID: james.westby@ubuntu.com-20051209194452-yggpemjlofpjqyf4
Tags: upstream-2.2.9
ImportĀ upstreamĀ versionĀ 2.2.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8" ?>
 
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
 
3
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
 
4
 
 
5
<refentry id="libgimp-gimpimage">
 
6
<refmeta>
 
7
<refentrytitle>gimpimage</refentrytitle>
 
8
<manvolnum>3</manvolnum>
 
9
<refmiscinfo>LIBGIMP Library</refmiscinfo>
 
10
</refmeta>
 
11
 
 
12
<refnamediv>
 
13
<refname>gimpimage</refname><refpurpose>Operations on complete images.</refpurpose>
 
14
</refnamediv>
 
15
 
 
16
<refsynopsisdiv><title>Synopsis</title>
 
17
 
 
18
<synopsis>
 
19
 
 
20
 
 
21
 
 
22
<link linkend="gint">gint</link>*       <link linkend="gimp-image-list">gimp_image_list</link>                 (<link linkend="gint">gint</link> *num_images);
 
23
<link linkend="gint32">gint32</link>      <link linkend="gimp-image-new">gimp_image_new</link>                  (<link linkend="gint">gint</link> width,
 
24
                                             <link linkend="gint">gint</link> height,
 
25
                                             <link linkend="GimpImageBaseType">GimpImageBaseType</link> type);
 
26
<link linkend="gint32">gint32</link>      <link linkend="gimp-image-duplicate">gimp_image_duplicate</link>            (<link linkend="gint32">gint32</link> image_ID);
 
27
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-delete">gimp_image_delete</link>               (<link linkend="gint32">gint32</link> image_ID);
 
28
<link linkend="GimpImageBaseType">GimpImageBaseType</link> <link linkend="gimp-image-base-type">gimp_image_base_type</link>      (<link linkend="gint32">gint32</link> image_ID);
 
29
<link linkend="gint">gint</link>        <link linkend="gimp-image-width">gimp_image_width</link>                (<link linkend="gint32">gint32</link> image_ID);
 
30
<link linkend="gint">gint</link>        <link linkend="gimp-image-height">gimp_image_height</link>               (<link linkend="gint32">gint32</link> image_ID);
 
31
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-free-shadow">gimp_image_free_shadow</link>          (<link linkend="gint32">gint32</link> image_ID);
 
32
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-flip">gimp_image_flip</link>                 (<link linkend="gint32">gint32</link> image_ID,
 
33
                                             <link linkend="GimpOrientationType">GimpOrientationType</link> flip_type);
 
34
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-rotate">gimp_image_rotate</link>               (<link linkend="gint32">gint32</link> image_ID,
 
35
                                             <link linkend="GimpRotationType">GimpRotationType</link> rotate_type);
 
36
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-resize">gimp_image_resize</link>               (<link linkend="gint32">gint32</link> image_ID,
 
37
                                             <link linkend="gint">gint</link> new_width,
 
38
                                             <link linkend="gint">gint</link> new_height,
 
39
                                             <link linkend="gint">gint</link> offx,
 
40
                                             <link linkend="gint">gint</link> offy);
 
41
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-resize-to-layers">gimp_image_resize_to_layers</link>     (<link linkend="gint32">gint32</link> image_ID);
 
42
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-scale">gimp_image_scale</link>                (<link linkend="gint32">gint32</link> image_ID,
 
43
                                             <link linkend="gint">gint</link> new_width,
 
44
                                             <link linkend="gint">gint</link> new_height);
 
45
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-crop">gimp_image_crop</link>                 (<link linkend="gint32">gint32</link> image_ID,
 
46
                                             <link linkend="gint">gint</link> new_width,
 
47
                                             <link linkend="gint">gint</link> new_height,
 
48
                                             <link linkend="gint">gint</link> offx,
 
49
                                             <link linkend="gint">gint</link> offy);
 
50
<link linkend="gint">gint</link>*       <link linkend="gimp-image-get-layers">gimp_image_get_layers</link>           (<link linkend="gint32">gint32</link> image_ID,
 
51
                                             <link linkend="gint">gint</link> *num_layers);
 
52
<link linkend="gint">gint</link>*       <link linkend="gimp-image-get-channels">gimp_image_get_channels</link>         (<link linkend="gint32">gint32</link> image_ID,
 
53
                                             <link linkend="gint">gint</link> *num_channels);
 
54
<link linkend="gint32">gint32</link>      <link linkend="gimp-image-get-active-drawable">gimp_image_get_active_drawable</link>  (<link linkend="gint32">gint32</link> image_ID);
 
55
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-unset-active-channel">gimp_image_unset_active_channel</link> (<link linkend="gint32">gint32</link> image_ID);
 
56
<link linkend="gint32">gint32</link>      <link linkend="gimp-image-get-floating-sel">gimp_image_get_floating_sel</link>     (<link linkend="gint32">gint32</link> image_ID);
 
57
<link linkend="gint32">gint32</link>      <link linkend="gimp-image-floating-sel-attached-to">gimp_image_floating_sel_attached_to</link>
 
58
                                            (<link linkend="gint32">gint32</link> image_ID);
 
59
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-pick-color">gimp_image_pick_color</link>           (<link linkend="gint32">gint32</link> image_ID,
 
60
                                             <link linkend="gint32">gint32</link> drawable_ID,
 
61
                                             <link linkend="gdouble">gdouble</link> x,
 
62
                                             <link linkend="gdouble">gdouble</link> y,
 
63
                                             <link linkend="gboolean">gboolean</link> sample_merged,
 
64
                                             <link linkend="gboolean">gboolean</link> sample_average,
 
65
                                             <link linkend="gdouble">gdouble</link> average_radius,
 
66
                                             <link linkend="GimpRGB">GimpRGB</link> *color);
 
67
<link linkend="gint32">gint32</link>      <link linkend="gimp-image-pick-correlate-layer">gimp_image_pick_correlate_layer</link> (<link linkend="gint32">gint32</link> image_ID,
 
68
                                             <link linkend="gint">gint</link> x,
 
69
                                             <link linkend="gint">gint</link> y);
 
70
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-add-layer">gimp_image_add_layer</link>            (<link linkend="gint32">gint32</link> image_ID,
 
71
                                             <link linkend="gint32">gint32</link> layer_ID,
 
72
                                             <link linkend="gint">gint</link> position);
 
73
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-remove-layer">gimp_image_remove_layer</link>         (<link linkend="gint32">gint32</link> image_ID,
 
74
                                             <link linkend="gint32">gint32</link> layer_ID);
 
75
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-raise-layer">gimp_image_raise_layer</link>          (<link linkend="gint32">gint32</link> image_ID,
 
76
                                             <link linkend="gint32">gint32</link> layer_ID);
 
77
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-lower-layer">gimp_image_lower_layer</link>          (<link linkend="gint32">gint32</link> image_ID,
 
78
                                             <link linkend="gint32">gint32</link> layer_ID);
 
79
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-raise-layer-to-top">gimp_image_raise_layer_to_top</link>   (<link linkend="gint32">gint32</link> image_ID,
 
80
                                             <link linkend="gint32">gint32</link> layer_ID);
 
81
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-lower-layer-to-bottom">gimp_image_lower_layer_to_bottom</link>
 
82
                                            (<link linkend="gint32">gint32</link> image_ID,
 
83
                                             <link linkend="gint32">gint32</link> layer_ID);
 
84
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-add-channel">gimp_image_add_channel</link>          (<link linkend="gint32">gint32</link> image_ID,
 
85
                                             <link linkend="gint32">gint32</link> channel_ID,
 
86
                                             <link linkend="gint">gint</link> position);
 
87
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-remove-channel">gimp_image_remove_channel</link>       (<link linkend="gint32">gint32</link> image_ID,
 
88
                                             <link linkend="gint32">gint32</link> channel_ID);
 
89
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-raise-channel">gimp_image_raise_channel</link>        (<link linkend="gint32">gint32</link> image_ID,
 
90
                                             <link linkend="gint32">gint32</link> channel_ID);
 
91
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-lower-channel">gimp_image_lower_channel</link>        (<link linkend="gint32">gint32</link> image_ID,
 
92
                                             <link linkend="gint32">gint32</link> layer_ID);
 
93
<link linkend="gint32">gint32</link>      <link linkend="gimp-image-flatten">gimp_image_flatten</link>              (<link linkend="gint32">gint32</link> image_ID);
 
94
<link linkend="gint32">gint32</link>      <link linkend="gimp-image-merge-visible-layers">gimp_image_merge_visible_layers</link> (<link linkend="gint32">gint32</link> image_ID,
 
95
                                             <link linkend="GimpMergeType">GimpMergeType</link> merge_type);
 
96
<link linkend="gint32">gint32</link>      <link linkend="gimp-image-merge-down">gimp_image_merge_down</link>           (<link linkend="gint32">gint32</link> image_ID,
 
97
                                             <link linkend="gint32">gint32</link> merge_layer_ID,
 
98
                                             <link linkend="GimpMergeType">GimpMergeType</link> merge_type);
 
99
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-clean-all">gimp_image_clean_all</link>            (<link linkend="gint32">gint32</link> image_ID);
 
100
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-is-dirty">gimp_image_is_dirty</link>             (<link linkend="gint32">gint32</link> image_ID);
 
101
<link linkend="gint32">gint32</link>      <link linkend="gimp-image-get-active-layer">gimp_image_get_active_layer</link>     (<link linkend="gint32">gint32</link> image_ID);
 
102
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-active-layer">gimp_image_set_active_layer</link>     (<link linkend="gint32">gint32</link> image_ID,
 
103
                                             <link linkend="gint32">gint32</link> active_layer_ID);
 
104
<link linkend="gint32">gint32</link>      <link linkend="gimp-image-get-active-channel">gimp_image_get_active_channel</link>   (<link linkend="gint32">gint32</link> image_ID);
 
105
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-active-channel">gimp_image_set_active_channel</link>   (<link linkend="gint32">gint32</link> image_ID,
 
106
                                             <link linkend="gint32">gint32</link> active_channel_ID);
 
107
<link linkend="gint32">gint32</link>      <link linkend="gimp-image-get-selection">gimp_image_get_selection</link>        (<link linkend="gint32">gint32</link> image_ID);
 
108
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-get-component-active">gimp_image_get_component_active</link> (<link linkend="gint32">gint32</link> image_ID,
 
109
                                             <link linkend="GimpChannelType">GimpChannelType</link> component);
 
110
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-component-active">gimp_image_set_component_active</link> (<link linkend="gint32">gint32</link> image_ID,
 
111
                                             <link linkend="GimpChannelType">GimpChannelType</link> component,
 
112
                                             <link linkend="gboolean">gboolean</link> active);
 
113
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-get-component-visible">gimp_image_get_component_visible</link>
 
114
                                            (<link linkend="gint32">gint32</link> image_ID,
 
115
                                             <link linkend="GimpChannelType">GimpChannelType</link> component);
 
116
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-component-visible">gimp_image_set_component_visible</link>
 
117
                                            (<link linkend="gint32">gint32</link> image_ID,
 
118
                                             <link linkend="GimpChannelType">GimpChannelType</link> component,
 
119
                                             <link linkend="gboolean">gboolean</link> visible);
 
120
<link linkend="gchar">gchar</link>*      <link linkend="gimp-image-get-filename">gimp_image_get_filename</link>         (<link linkend="gint32">gint32</link> image_ID);
 
121
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-filename">gimp_image_set_filename</link>         (<link linkend="gint32">gint32</link> image_ID,
 
122
                                             const <link linkend="gchar">gchar</link> *filename);
 
123
<link linkend="gchar">gchar</link>*      <link linkend="gimp-image-get-name">gimp_image_get_name</link>             (<link linkend="gint32">gint32</link> image_ID);
 
124
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-get-resolution">gimp_image_get_resolution</link>       (<link linkend="gint32">gint32</link> image_ID,
 
125
                                             <link linkend="gdouble">gdouble</link> *xresolution,
 
126
                                             <link linkend="gdouble">gdouble</link> *yresolution);
 
127
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-resolution">gimp_image_set_resolution</link>       (<link linkend="gint32">gint32</link> image_ID,
 
128
                                             <link linkend="gdouble">gdouble</link> xresolution,
 
129
                                             <link linkend="gdouble">gdouble</link> yresolution);
 
130
<link linkend="GimpUnit">GimpUnit</link>    <link linkend="gimp-image-get-unit">gimp_image_get_unit</link>             (<link linkend="gint32">gint32</link> image_ID);
 
131
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-unit">gimp_image_set_unit</link>             (<link linkend="gint32">gint32</link> image_ID,
 
132
                                             <link linkend="GimpUnit">GimpUnit</link> unit);
 
133
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-tattoo-state">gimp_image_set_tattoo_state</link>     (<link linkend="gint32">gint32</link> image_ID,
 
134
                                             <link linkend="gint">gint</link> tattoo_state);
 
135
<link linkend="gint">gint</link>        <link linkend="gimp-image-get-tattoo-state">gimp_image_get_tattoo_state</link>     (<link linkend="gint32">gint32</link> image_ID);
 
136
<link linkend="gint32">gint32</link>      <link linkend="gimp-image-get-layer-by-tattoo">gimp_image_get_layer_by_tattoo</link>  (<link linkend="gint32">gint32</link> image_ID,
 
137
                                             <link linkend="gint">gint</link> tattoo);
 
138
<link linkend="gint32">gint32</link>      <link linkend="gimp-image-get-channel-by-tattoo">gimp_image_get_channel_by_tattoo</link>
 
139
                                            (<link linkend="gint32">gint32</link> image_ID,
 
140
                                             <link linkend="gint">gint</link> tattoo);
 
141
<link linkend="guchar">guchar</link>*     <link linkend="gimp-image-get-cmap">gimp_image_get_cmap</link>             (<link linkend="gint32">gint32</link> image_ID,
 
142
                                             <link linkend="gint">gint</link> *num_colors);
 
143
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-cmap">gimp_image_set_cmap</link>             (<link linkend="gint32">gint32</link> image_ID,
 
144
                                             const <link linkend="guchar">guchar</link> *cmap,
 
145
                                             <link linkend="gint">gint</link> num_colors);
 
146
<link linkend="guchar">guchar</link>*     <link linkend="gimp-image-get-colormap">gimp_image_get_colormap</link>         (<link linkend="gint32">gint32</link> image_ID,
 
147
                                             <link linkend="gint">gint</link> *num_colors);
 
148
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-set-colormap">gimp_image_set_colormap</link>         (<link linkend="gint32">gint32</link> image_ID,
 
149
                                             const <link linkend="guchar">guchar</link> *colormap,
 
150
                                             <link linkend="gint">gint</link> num_colors);
 
151
<link linkend="guchar">guchar</link>*     <link linkend="gimp-image-get-thumbnail-data">gimp_image_get_thumbnail_data</link>   (<link linkend="gint32">gint32</link> image_ID,
 
152
                                             <link linkend="gint">gint</link> *width,
 
153
                                             <link linkend="gint">gint</link> *height,
 
154
                                             <link linkend="gint">gint</link> *bpp);
 
155
<link linkend="GimpParasite">GimpParasite</link>* <link linkend="gimp-image-parasite-find">gimp_image_parasite_find</link>      (<link linkend="gint32">gint32</link> image_ID,
 
156
                                             const <link linkend="gchar">gchar</link> *name);
 
157
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-parasite-list">gimp_image_parasite_list</link>        (<link linkend="gint32">gint32</link> image_ID,
 
158
                                             <link linkend="gint">gint</link> *num_parasites,
 
159
                                             <link linkend="gchar">gchar</link> ***parasites);
 
160
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-parasite-attach">gimp_image_parasite_attach</link>      (<link linkend="gint32">gint32</link> image_ID,
 
161
                                             <link linkend="GimpParasite">GimpParasite</link> *parasite);
 
162
<link linkend="gboolean">gboolean</link>    <link linkend="gimp-image-parasite-detach">gimp_image_parasite_detach</link>      (<link linkend="gint32">gint32</link> image_ID,
 
163
                                             const <link linkend="gchar">gchar</link> *name);
 
164
<link linkend="void">void</link>        <link linkend="gimp-image-attach-new-parasite">gimp_image_attach_new_parasite</link>  (<link linkend="gint32">gint32</link> image_ID,
 
165
                                             const <link linkend="gchar">gchar</link> *name,
 
166
                                             <link linkend="gint">gint</link> flags,
 
167
                                             <link linkend="gint">gint</link> size,
 
168
                                             <link linkend="gconstpointer">gconstpointer</link> data);
 
169
</synopsis>
 
170
</refsynopsisdiv>
 
171
 
 
172
 
 
173
 
 
174
 
 
175
 
 
176
 
 
177
 
 
178
 
 
179
 
 
180
<refsect1>
 
181
<title>Description</title>
 
182
<para>
 
183
Operations on complete images: creation, resizing/rescaling,
 
184
and operations involving multiple layers.
 
185
 
 
186
</para>
 
187
</refsect1>
 
188
 
 
189
<refsect1>
 
190
<title>Details</title>
 
191
<refsect2>
 
192
<title><anchor id="gimp-image-list"/>gimp_image_list ()</title>
 
193
<indexterm><primary>gimp_image_list</primary></indexterm><programlisting><link linkend="gint">gint</link>*       gimp_image_list                 (<link linkend="gint">gint</link> *num_images);</programlisting>
 
194
<para>
 
195
Returns the list of images currently open.
 
196
</para>
 
197
<para>
 
198
This procedure returns the list of images currently open in the
 
199
GIMP.</para>
 
200
<para>
 
201
 
 
202
</para><variablelist role="params">
 
203
<varlistentry><term><parameter>num_images</parameter>&nbsp;:</term>
 
204
<listitem><simpara> The number of images currently open.
 
205
</simpara></listitem></varlistentry>
 
206
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The list of images currently open.
 
207
</simpara></listitem></varlistentry>
 
208
</variablelist></refsect2>
 
209
<refsect2>
 
210
<title><anchor id="gimp-image-new"/>gimp_image_new ()</title>
 
211
<indexterm><primary>gimp_image_new</primary></indexterm><programlisting><link linkend="gint32">gint32</link>      gimp_image_new                  (<link linkend="gint">gint</link> width,
 
212
                                             <link linkend="gint">gint</link> height,
 
213
                                             <link linkend="GimpImageBaseType">GimpImageBaseType</link> type);</programlisting>
 
214
<para>
 
215
Creates a new image with the specified width, height, and type.
 
216
</para>
 
217
<para>
 
218
Creates a new image, undisplayed with the specified extents and
 
219
type. A layer should be created and added before this image is
 
220
displayed, or subsequent calls to 'gimp_display_new' with this image
 
221
as an argument will fail. Layers can be created using the
 
222
'gimp_layer_new' commands. They can be added to an image using the
 
223
'gimp_image_add_layer' command.</para>
 
224
<para>
 
225
 
 
226
</para><variablelist role="params">
 
227
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
 
228
<listitem><simpara> The width of the image.
 
229
</simpara></listitem></varlistentry>
 
230
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
 
231
<listitem><simpara> The height of the image.
 
232
</simpara></listitem></varlistentry>
 
233
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
 
234
<listitem><simpara> The type of image.
 
235
</simpara></listitem></varlistentry>
 
236
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The ID of the newly created image.
 
237
</simpara></listitem></varlistentry>
 
238
</variablelist></refsect2>
 
239
<refsect2>
 
240
<title><anchor id="gimp-image-duplicate"/>gimp_image_duplicate ()</title>
 
241
<indexterm><primary>gimp_image_duplicate</primary></indexterm><programlisting><link linkend="gint32">gint32</link>      gimp_image_duplicate            (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
242
<para>
 
243
Duplicate the specified image
 
244
</para>
 
245
<para>
 
246
This procedure duplicates the specified image, copying all layers,
 
247
channels, and image information.</para>
 
248
<para>
 
249
 
 
250
</para><variablelist role="params">
 
251
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
252
<listitem><simpara> The image.
 
253
</simpara></listitem></varlistentry>
 
254
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The new, duplicated image.
 
255
</simpara></listitem></varlistentry>
 
256
</variablelist></refsect2>
 
257
<refsect2>
 
258
<title><anchor id="gimp-image-delete"/>gimp_image_delete ()</title>
 
259
<indexterm><primary>gimp_image_delete</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_delete               (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
260
<para>
 
261
Delete the specified image.
 
262
</para>
 
263
<para>
 
264
If there are no displays associated with this image it will be
 
265
deleted. This means that you can not delete an image through the PDB
 
266
that was created by the user. If the associated display was however
 
267
created through the PDB and you know the display ID, you may delete
 
268
the display. Removal of the last associated display will then delete
 
269
the image.</para>
 
270
<para>
 
271
 
 
272
</para><variablelist role="params">
 
273
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
274
<listitem><simpara> The image.
 
275
</simpara></listitem></varlistentry>
 
276
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
277
</simpara></listitem></varlistentry>
 
278
</variablelist></refsect2>
 
279
<refsect2>
 
280
<title><anchor id="gimp-image-base-type"/>gimp_image_base_type ()</title>
 
281
<indexterm><primary>gimp_image_base_type</primary></indexterm><programlisting><link linkend="GimpImageBaseType">GimpImageBaseType</link> gimp_image_base_type      (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
282
<para>
 
283
Get the base type of the image.
 
284
</para>
 
285
<para>
 
286
This procedure returns the image's base type. Layers in the image
 
287
must be of this subtype, but can have an optional alpha channel.</para>
 
288
<para>
 
289
 
 
290
</para><variablelist role="params">
 
291
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
292
<listitem><simpara> The image.
 
293
</simpara></listitem></varlistentry>
 
294
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The image's base type.
 
295
</simpara></listitem></varlistentry>
 
296
</variablelist></refsect2>
 
297
<refsect2>
 
298
<title><anchor id="gimp-image-width"/>gimp_image_width ()</title>
 
299
<indexterm><primary>gimp_image_width</primary></indexterm><programlisting><link linkend="gint">gint</link>        gimp_image_width                (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
300
<para>
 
301
Return the width of the image
 
302
</para>
 
303
<para>
 
304
This procedure returns the image's width. This value is independent
 
305
of any of the layers in this image. This is the \"canvas\" width.</para>
 
306
<para>
 
307
 
 
308
</para><variablelist role="params">
 
309
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
310
<listitem><simpara> The image.
 
311
</simpara></listitem></varlistentry>
 
312
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The image's width.
 
313
</simpara></listitem></varlistentry>
 
314
</variablelist></refsect2>
 
315
<refsect2>
 
316
<title><anchor id="gimp-image-height"/>gimp_image_height ()</title>
 
317
<indexterm><primary>gimp_image_height</primary></indexterm><programlisting><link linkend="gint">gint</link>        gimp_image_height               (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
318
<para>
 
319
Return the height of the image
 
320
</para>
 
321
<para>
 
322
This procedure returns the image's height. This value is independent
 
323
of any of the layers in this image. This is the \"canvas\" height.</para>
 
324
<para>
 
325
 
 
326
</para><variablelist role="params">
 
327
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
328
<listitem><simpara> The image.
 
329
</simpara></listitem></varlistentry>
 
330
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The image's height.
 
331
</simpara></listitem></varlistentry>
 
332
</variablelist></refsect2>
 
333
<refsect2>
 
334
<title><anchor id="gimp-image-free-shadow"/>gimp_image_free_shadow ()</title>
 
335
<indexterm><primary>gimp_image_free_shadow</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_free_shadow          (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
336
<para>
 
337
Free the specified image's shadow data (if it exists).
 
338
</para>
 
339
<para>
 
340
This procedure is intended as a memory saving device. If any shadow
 
341
memory has been allocated, it will be freed automatically on a call
 
342
to 'gimp_image_delete'.</para>
 
343
<para>
 
344
 
 
345
</para><variablelist role="params">
 
346
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
347
<listitem><simpara> The image.
 
348
</simpara></listitem></varlistentry>
 
349
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
350
</simpara></listitem></varlistentry>
 
351
</variablelist></refsect2>
 
352
<refsect2>
 
353
<title><anchor id="gimp-image-flip"/>gimp_image_flip ()</title>
 
354
<indexterm><primary>gimp_image_flip</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_flip                 (<link linkend="gint32">gint32</link> image_ID,
 
355
                                             <link linkend="GimpOrientationType">GimpOrientationType</link> flip_type);</programlisting>
 
356
<para>
 
357
Flips the image horizontally or vertically.
 
358
</para>
 
359
<para>
 
360
This procedure flips (mirrors) the image.</para>
 
361
<para>
 
362
 
 
363
</para><variablelist role="params">
 
364
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
365
<listitem><simpara> The image.
 
366
</simpara></listitem></varlistentry>
 
367
<varlistentry><term><parameter>flip_type</parameter>&nbsp;:</term>
 
368
<listitem><simpara> Type of flip.
 
369
</simpara></listitem></varlistentry>
 
370
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
371
</simpara></listitem></varlistentry>
 
372
</variablelist></refsect2>
 
373
<refsect2>
 
374
<title><anchor id="gimp-image-rotate"/>gimp_image_rotate ()</title>
 
375
<indexterm><primary>gimp_image_rotate</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_rotate               (<link linkend="gint32">gint32</link> image_ID,
 
376
                                             <link linkend="GimpRotationType">GimpRotationType</link> rotate_type);</programlisting>
 
377
<para>
 
378
Rotates the image by the specified degrees.
 
379
</para>
 
380
<para>
 
381
This procedure rotates the image.</para>
 
382
<para>
 
383
 
 
384
</para><variablelist role="params">
 
385
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
386
<listitem><simpara> The image.
 
387
</simpara></listitem></varlistentry>
 
388
<varlistentry><term><parameter>rotate_type</parameter>&nbsp;:</term>
 
389
<listitem><simpara> Angle of rotation.
 
390
</simpara></listitem></varlistentry>
 
391
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
392
</simpara></listitem></varlistentry>
 
393
</variablelist></refsect2>
 
394
<refsect2>
 
395
<title><anchor id="gimp-image-resize"/>gimp_image_resize ()</title>
 
396
<indexterm><primary>gimp_image_resize</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_resize               (<link linkend="gint32">gint32</link> image_ID,
 
397
                                             <link linkend="gint">gint</link> new_width,
 
398
                                             <link linkend="gint">gint</link> new_height,
 
399
                                             <link linkend="gint">gint</link> offx,
 
400
                                             <link linkend="gint">gint</link> offy);</programlisting>
 
401
<para>
 
402
Resize the image to the specified extents.
 
403
</para>
 
404
<para>
 
405
This procedure resizes the image so that it's new width and height
 
406
are equal to the supplied parameters. Offsets are also provided
 
407
which describe the position of the previous image's content. No
 
408
bounds checking is currently provided, so don't supply parameters
 
409
that are out of bounds. All channels within the image are resized
 
410
according to the specified parameters; this includes the image
 
411
selection mask. All layers within the image are repositioned
 
412
according to the specified offsets.</para>
 
413
<para>
 
414
 
 
415
</para><variablelist role="params">
 
416
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
417
<listitem><simpara> The image.
 
418
</simpara></listitem></varlistentry>
 
419
<varlistentry><term><parameter>new_width</parameter>&nbsp;:</term>
 
420
<listitem><simpara> New image width.
 
421
</simpara></listitem></varlistentry>
 
422
<varlistentry><term><parameter>new_height</parameter>&nbsp;:</term>
 
423
<listitem><simpara> New image height.
 
424
</simpara></listitem></varlistentry>
 
425
<varlistentry><term><parameter>offx</parameter>&nbsp;:</term>
 
426
<listitem><simpara> x offset between upper left corner of old and new images: (new - old).
 
427
</simpara></listitem></varlistentry>
 
428
<varlistentry><term><parameter>offy</parameter>&nbsp;:</term>
 
429
<listitem><simpara> y offset between upper left corner of old and new images: (new - old).
 
430
</simpara></listitem></varlistentry>
 
431
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
432
</simpara></listitem></varlistentry>
 
433
</variablelist></refsect2>
 
434
<refsect2>
 
435
<title><anchor id="gimp-image-resize-to-layers"/>gimp_image_resize_to_layers ()</title>
 
436
<indexterm role="GIMP 2.2"><primary>gimp_image_resize_to_layers</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_resize_to_layers     (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
437
<para>
 
438
Resize the image to fit all layers.
 
439
</para>
 
440
<para>
 
441
This procedure resizes the image to the bounding box of all layers
 
442
of the image. All channels within the image are resized to the new
 
443
size; this includes the image selection mask. All layers within the
 
444
image are repositioned to the new image area.</para>
 
445
<para>
 
446
 
 
447
</para><variablelist role="params">
 
448
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
449
<listitem><simpara> The image.
 
450
</simpara></listitem></varlistentry>
 
451
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
452
 
 
453
</simpara></listitem></varlistentry>
 
454
</variablelist><para>Since  GIMP 2.2
 
455
</para></refsect2>
 
456
<refsect2>
 
457
<title><anchor id="gimp-image-scale"/>gimp_image_scale ()</title>
 
458
<indexterm><primary>gimp_image_scale</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_scale                (<link linkend="gint32">gint32</link> image_ID,
 
459
                                             <link linkend="gint">gint</link> new_width,
 
460
                                             <link linkend="gint">gint</link> new_height);</programlisting>
 
461
<para>
 
462
Scale the image to the specified extents.
 
463
</para>
 
464
<para>
 
465
This procedure scales the image so that its new width and height are
 
466
equal to the supplied parameters. Offsets are also provided which
 
467
describe the position of the previous image's content. No bounds
 
468
checking is currently provided, so don't supply parameters that are
 
469
out of bounds. All channels within the image are scaled according to
 
470
the specified parameters; this includes the image selection mask.
 
471
All layers within the image are repositioned according to the
 
472
specified offsets.</para>
 
473
<para>
 
474
 
 
475
</para><variablelist role="params">
 
476
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
477
<listitem><simpara> The image.
 
478
</simpara></listitem></varlistentry>
 
479
<varlistentry><term><parameter>new_width</parameter>&nbsp;:</term>
 
480
<listitem><simpara> New image width.
 
481
</simpara></listitem></varlistentry>
 
482
<varlistentry><term><parameter>new_height</parameter>&nbsp;:</term>
 
483
<listitem><simpara> New image height.
 
484
</simpara></listitem></varlistentry>
 
485
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
486
</simpara></listitem></varlistentry>
 
487
</variablelist></refsect2>
 
488
<refsect2>
 
489
<title><anchor id="gimp-image-crop"/>gimp_image_crop ()</title>
 
490
<indexterm><primary>gimp_image_crop</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_crop                 (<link linkend="gint32">gint32</link> image_ID,
 
491
                                             <link linkend="gint">gint</link> new_width,
 
492
                                             <link linkend="gint">gint</link> new_height,
 
493
                                             <link linkend="gint">gint</link> offx,
 
494
                                             <link linkend="gint">gint</link> offy);</programlisting>
 
495
<para>
 
496
Crop the image to the specified extents.
 
497
</para>
 
498
<para>
 
499
This procedure crops the image so that it's new width and height are
 
500
equal to the supplied parameters. Offsets are also provided which
 
501
describe the position of the previous image's content. All channels
 
502
and layers within the image are cropped to the new image extents;
 
503
this includes the image selection mask. If any parameters are out of
 
504
range, an error is returned.</para>
 
505
<para>
 
506
 
 
507
</para><variablelist role="params">
 
508
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
509
<listitem><simpara> The image.
 
510
</simpara></listitem></varlistentry>
 
511
<varlistentry><term><parameter>new_width</parameter>&nbsp;:</term>
 
512
<listitem><simpara> New image width: (0 &lt; new_width &lt;= width).
 
513
</simpara></listitem></varlistentry>
 
514
<varlistentry><term><parameter>new_height</parameter>&nbsp;:</term>
 
515
<listitem><simpara> New image height: (0 &lt; new_height &lt;= height).
 
516
</simpara></listitem></varlistentry>
 
517
<varlistentry><term><parameter>offx</parameter>&nbsp;:</term>
 
518
<listitem><simpara> x offset: (0 &lt;= offx &lt;= (width - new_width)).
 
519
</simpara></listitem></varlistentry>
 
520
<varlistentry><term><parameter>offy</parameter>&nbsp;:</term>
 
521
<listitem><simpara> y offset: (0 &lt;= offy &lt;= (height - new_height)).
 
522
</simpara></listitem></varlistentry>
 
523
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
524
</simpara></listitem></varlistentry>
 
525
</variablelist></refsect2>
 
526
<refsect2>
 
527
<title><anchor id="gimp-image-get-layers"/>gimp_image_get_layers ()</title>
 
528
<indexterm><primary>gimp_image_get_layers</primary></indexterm><programlisting><link linkend="gint">gint</link>*       gimp_image_get_layers           (<link linkend="gint32">gint32</link> image_ID,
 
529
                                             <link linkend="gint">gint</link> *num_layers);</programlisting>
 
530
<para>
 
531
Returns the list of layers contained in the specified image.
 
532
</para>
 
533
<para>
 
534
This procedure returns the list of layers contained in the specified
 
535
image. The order of layers is from topmost to bottommost.</para>
 
536
<para>
 
537
 
 
538
</para><variablelist role="params">
 
539
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
540
<listitem><simpara> The image.
 
541
</simpara></listitem></varlistentry>
 
542
<varlistentry><term><parameter>num_layers</parameter>&nbsp;:</term>
 
543
<listitem><simpara> The number of layers contained in the image.
 
544
</simpara></listitem></varlistentry>
 
545
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The list of layers contained in the image.
 
546
</simpara></listitem></varlistentry>
 
547
</variablelist></refsect2>
 
548
<refsect2>
 
549
<title><anchor id="gimp-image-get-channels"/>gimp_image_get_channels ()</title>
 
550
<indexterm><primary>gimp_image_get_channels</primary></indexterm><programlisting><link linkend="gint">gint</link>*       gimp_image_get_channels         (<link linkend="gint32">gint32</link> image_ID,
 
551
                                             <link linkend="gint">gint</link> *num_channels);</programlisting>
 
552
<para>
 
553
Returns the list of channels contained in the specified image.
 
554
</para>
 
555
<para>
 
556
This procedure returns the list of channels contained in the
 
557
specified image. This does not include the selection mask, or layer
 
558
masks. The order is from topmost to bottommost.</para>
 
559
<para>
 
560
 
 
561
</para><variablelist role="params">
 
562
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
563
<listitem><simpara> The image.
 
564
</simpara></listitem></varlistentry>
 
565
<varlistentry><term><parameter>num_channels</parameter>&nbsp;:</term>
 
566
<listitem><simpara> The number of channels contained in the image.
 
567
</simpara></listitem></varlistentry>
 
568
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The list of channels contained in the image.
 
569
</simpara></listitem></varlistentry>
 
570
</variablelist></refsect2>
 
571
<refsect2>
 
572
<title><anchor id="gimp-image-get-active-drawable"/>gimp_image_get_active_drawable ()</title>
 
573
<indexterm><primary>gimp_image_get_active_drawable</primary></indexterm><programlisting><link linkend="gint32">gint32</link>      gimp_image_get_active_drawable  (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
574
<para>
 
575
Get the image's active drawable
 
576
</para>
 
577
<para>
 
578
This procedure returns the ID of the image's active drawable. This
 
579
can be either a layer, a channel, or a layer mask. The active
 
580
drawable is specified by the active image channel. If that is -1,
 
581
then by the active image layer. If the active image layer has a
 
582
layer mask and the layer mask is in edit mode, then the layer mask
 
583
is the active drawable.</para>
 
584
<para>
 
585
 
 
586
</para><variablelist role="params">
 
587
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
588
<listitem><simpara> The image.
 
589
</simpara></listitem></varlistentry>
 
590
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The active drawable.
 
591
</simpara></listitem></varlistentry>
 
592
</variablelist></refsect2>
 
593
<refsect2>
 
594
<title><anchor id="gimp-image-unset-active-channel"/>gimp_image_unset_active_channel ()</title>
 
595
<indexterm><primary>gimp_image_unset_active_channel</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_unset_active_channel (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
596
<para>
 
597
Unsets the active channel in the specified image.
 
598
</para>
 
599
<para>
 
600
If an active channel exists, it is unset. There then exists no
 
601
active channel, and if desired, one can be set through a call to
 
602
'Set Active Channel'. No error is returned in the case of no
 
603
existing active channel.</para>
 
604
<para>
 
605
 
 
606
</para><variablelist role="params">
 
607
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
608
<listitem><simpara> The image.
 
609
</simpara></listitem></varlistentry>
 
610
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
611
</simpara></listitem></varlistentry>
 
612
</variablelist></refsect2>
 
613
<refsect2>
 
614
<title><anchor id="gimp-image-get-floating-sel"/>gimp_image_get_floating_sel ()</title>
 
615
<indexterm><primary>gimp_image_get_floating_sel</primary></indexterm><programlisting><link linkend="gint32">gint32</link>      gimp_image_get_floating_sel     (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
616
<para>
 
617
Return the floating selection of the image.
 
618
</para>
 
619
<para>
 
620
This procedure returns the image's floating selection, if it exists.
 
621
If it doesn't exist, -1 is returned as the layer ID.</para>
 
622
<para>
 
623
 
 
624
</para><variablelist role="params">
 
625
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
626
<listitem><simpara> The image.
 
627
</simpara></listitem></varlistentry>
 
628
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The image's floating selection.
 
629
</simpara></listitem></varlistentry>
 
630
</variablelist></refsect2>
 
631
<refsect2>
 
632
<title><anchor id="gimp-image-floating-sel-attached-to"/>gimp_image_floating_sel_attached_to ()</title>
 
633
<indexterm><primary>gimp_image_floating_sel_attached_to</primary></indexterm><programlisting><link linkend="gint32">gint32</link>      gimp_image_floating_sel_attached_to
 
634
                                            (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
635
<para>
 
636
Return the drawable the floating selection is attached to.
 
637
</para>
 
638
<para>
 
639
This procedure returns the drawable the image's floating selection
 
640
is attached to, if it exists. If it doesn't exist, -1 is returned as
 
641
the drawable ID.</para>
 
642
<para>
 
643
 
 
644
</para><variablelist role="params">
 
645
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
646
<listitem><simpara> The image.
 
647
</simpara></listitem></varlistentry>
 
648
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The drawable the floating selection is attached to.
 
649
</simpara></listitem></varlistentry>
 
650
</variablelist></refsect2>
 
651
<refsect2>
 
652
<title><anchor id="gimp-image-pick-color"/>gimp_image_pick_color ()</title>
 
653
<indexterm><primary>gimp_image_pick_color</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_pick_color           (<link linkend="gint32">gint32</link> image_ID,
 
654
                                             <link linkend="gint32">gint32</link> drawable_ID,
 
655
                                             <link linkend="gdouble">gdouble</link> x,
 
656
                                             <link linkend="gdouble">gdouble</link> y,
 
657
                                             <link linkend="gboolean">gboolean</link> sample_merged,
 
658
                                             <link linkend="gboolean">gboolean</link> sample_average,
 
659
                                             <link linkend="gdouble">gdouble</link> average_radius,
 
660
                                             <link linkend="GimpRGB">GimpRGB</link> *color);</programlisting>
 
661
<para>
 
662
Determine the color at the given drawable coordinates
 
663
</para>
 
664
<para>
 
665
This tool determines the color at the specified coordinates. The
 
666
returned color is an RGB triplet even for grayscale and indexed
 
667
drawables. If the coordinates lie outside of the extents of the
 
668
specified drawable, then an error is returned. If the drawable has
 
669
an alpha channel, the algorithm examines the alpha value of the
 
670
drawable at the coordinates. If the alpha value is completely
 
671
transparent (0), then an error is returned. If the sample_merged
 
672
parameter is non-zero, the data of the composite image will be used
 
673
instead of that for the specified drawable. This is equivalent to
 
674
sampling for colors after merging all visible layers. In the case of
 
675
a merged sampling, the supplied drawable is ignored except for
 
676
finding the image it belongs to.</para>
 
677
<para>
 
678
 
 
679
</para><variablelist role="params">
 
680
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
681
<listitem><simpara> The image.
 
682
</simpara></listitem></varlistentry>
 
683
<varlistentry><term><parameter>drawable_ID</parameter>&nbsp;:</term>
 
684
<listitem><simpara> The drawable to pick from.
 
685
</simpara></listitem></varlistentry>
 
686
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
 
687
<listitem><simpara> x coordinate of upper-left corner of rectangle.
 
688
</simpara></listitem></varlistentry>
 
689
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
 
690
<listitem><simpara> y coordinate of upper-left corner of rectangle.
 
691
</simpara></listitem></varlistentry>
 
692
<varlistentry><term><parameter>sample_merged</parameter>&nbsp;:</term>
 
693
<listitem><simpara> Use the composite image, not the drawable.
 
694
</simpara></listitem></varlistentry>
 
695
<varlistentry><term><parameter>sample_average</parameter>&nbsp;:</term>
 
696
<listitem><simpara> Average the color of all the pixels in a specified radius.
 
697
</simpara></listitem></varlistentry>
 
698
<varlistentry><term><parameter>average_radius</parameter>&nbsp;:</term>
 
699
<listitem><simpara> The radius of pixels to average.
 
700
</simpara></listitem></varlistentry>
 
701
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
 
702
<listitem><simpara> The return color.
 
703
</simpara></listitem></varlistentry>
 
704
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
705
</simpara></listitem></varlistentry>
 
706
</variablelist></refsect2>
 
707
<refsect2>
 
708
<title><anchor id="gimp-image-pick-correlate-layer"/>gimp_image_pick_correlate_layer ()</title>
 
709
<indexterm><primary>gimp_image_pick_correlate_layer</primary></indexterm><programlisting><link linkend="gint32">gint32</link>      gimp_image_pick_correlate_layer (<link linkend="gint32">gint32</link> image_ID,
 
710
                                             <link linkend="gint">gint</link> x,
 
711
                                             <link linkend="gint">gint</link> y);</programlisting>
 
712
<para>
 
713
Find the layer visible at the specified coordinates.
 
714
</para>
 
715
<para>
 
716
This procedure finds the layer which is visible at the specified
 
717
coordinates. Layers which do not qualify are those whose extents do
 
718
not pass within the specified coordinates, or which are transparent
 
719
at the specified coordinates. This procedure will return -1 if no
 
720
layer is found.</para>
 
721
<para>
 
722
 
 
723
</para><variablelist role="params">
 
724
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
725
<listitem><simpara> The image.
 
726
</simpara></listitem></varlistentry>
 
727
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
 
728
<listitem><simpara> The x coordinate for the pick.
 
729
</simpara></listitem></varlistentry>
 
730
<varlistentry><term><parameter>y</parameter>&nbsp;:</term>
 
731
<listitem><simpara> The y coordinate for the pick.
 
732
</simpara></listitem></varlistentry>
 
733
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The layer found at the specified coordinates.
 
734
</simpara></listitem></varlistentry>
 
735
</variablelist></refsect2>
 
736
<refsect2>
 
737
<title><anchor id="gimp-image-add-layer"/>gimp_image_add_layer ()</title>
 
738
<indexterm><primary>gimp_image_add_layer</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_add_layer            (<link linkend="gint32">gint32</link> image_ID,
 
739
                                             <link linkend="gint32">gint32</link> layer_ID,
 
740
                                             <link linkend="gint">gint</link> position);</programlisting>
 
741
<para>
 
742
Add the specified layer to the image.
 
743
</para>
 
744
<para>
 
745
This procedure adds the specified layer to the gimage at the given
 
746
position. If the position is specified as -1, then the layer is
 
747
inserted at the top of the layer stack. If the layer to be added has
 
748
no alpha channel, it must be added at position 0. The layer type
 
749
must be compatible with the image base type.</para>
 
750
<para>
 
751
 
 
752
</para><variablelist role="params">
 
753
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
754
<listitem><simpara> The image.
 
755
</simpara></listitem></varlistentry>
 
756
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
 
757
<listitem><simpara> The layer.
 
758
</simpara></listitem></varlistentry>
 
759
<varlistentry><term><parameter>position</parameter>&nbsp;:</term>
 
760
<listitem><simpara> The layer position.
 
761
</simpara></listitem></varlistentry>
 
762
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
763
</simpara></listitem></varlistentry>
 
764
</variablelist></refsect2>
 
765
<refsect2>
 
766
<title><anchor id="gimp-image-remove-layer"/>gimp_image_remove_layer ()</title>
 
767
<indexterm><primary>gimp_image_remove_layer</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_remove_layer         (<link linkend="gint32">gint32</link> image_ID,
 
768
                                             <link linkend="gint32">gint32</link> layer_ID);</programlisting>
 
769
<para>
 
770
Remove the specified layer from the image.
 
771
</para>
 
772
<para>
 
773
This procedure removes the specified layer from the image. If the
 
774
layer doesn't exist, an error is returned. If there are no layers
 
775
left in the image, this call will fail. If this layer is the last
 
776
layer remaining, the image will become empty and have no active
 
777
layer.</para>
 
778
<para>
 
779
 
 
780
</para><variablelist role="params">
 
781
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
782
<listitem><simpara> The image.
 
783
</simpara></listitem></varlistentry>
 
784
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
 
785
<listitem><simpara> The layer.
 
786
</simpara></listitem></varlistentry>
 
787
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
788
</simpara></listitem></varlistentry>
 
789
</variablelist></refsect2>
 
790
<refsect2>
 
791
<title><anchor id="gimp-image-raise-layer"/>gimp_image_raise_layer ()</title>
 
792
<indexterm><primary>gimp_image_raise_layer</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_raise_layer          (<link linkend="gint32">gint32</link> image_ID,
 
793
                                             <link linkend="gint32">gint32</link> layer_ID);</programlisting>
 
794
<para>
 
795
Raise the specified layer in the image's layer stack
 
796
</para>
 
797
<para>
 
798
This procedure raises the specified layer one step in the existing
 
799
layer stack. It will not move the layer if there is no layer above
 
800
it, or the layer has no alpha channel.</para>
 
801
<para>
 
802
 
 
803
</para><variablelist role="params">
 
804
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
805
<listitem><simpara> The image.
 
806
</simpara></listitem></varlistentry>
 
807
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
 
808
<listitem><simpara> The layer to raise.
 
809
</simpara></listitem></varlistentry>
 
810
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
811
</simpara></listitem></varlistentry>
 
812
</variablelist></refsect2>
 
813
<refsect2>
 
814
<title><anchor id="gimp-image-lower-layer"/>gimp_image_lower_layer ()</title>
 
815
<indexterm><primary>gimp_image_lower_layer</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_lower_layer          (<link linkend="gint32">gint32</link> image_ID,
 
816
                                             <link linkend="gint32">gint32</link> layer_ID);</programlisting>
 
817
<para>
 
818
Lower the specified layer in the image's layer stack
 
819
</para>
 
820
<para>
 
821
This procedure lowers the specified layer one step in the existing
 
822
layer stack. It will not move the layer if there is no layer below
 
823
it, or the layer has no alpha channel.</para>
 
824
<para>
 
825
 
 
826
</para><variablelist role="params">
 
827
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
828
<listitem><simpara> The image.
 
829
</simpara></listitem></varlistentry>
 
830
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
 
831
<listitem><simpara> The layer to lower.
 
832
</simpara></listitem></varlistentry>
 
833
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
834
</simpara></listitem></varlistentry>
 
835
</variablelist></refsect2>
 
836
<refsect2>
 
837
<title><anchor id="gimp-image-raise-layer-to-top"/>gimp_image_raise_layer_to_top ()</title>
 
838
<indexterm><primary>gimp_image_raise_layer_to_top</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_raise_layer_to_top   (<link linkend="gint32">gint32</link> image_ID,
 
839
                                             <link linkend="gint32">gint32</link> layer_ID);</programlisting>
 
840
<para>
 
841
Raise the specified layer in the image's layer stack to top of stack
 
842
</para>
 
843
<para>
 
844
This procedure raises the specified layer to top of the existing
 
845
layer stack. It will not move the layer if there is no layer above
 
846
it, or the layer has no alpha channel.</para>
 
847
<para>
 
848
 
 
849
</para><variablelist role="params">
 
850
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
851
<listitem><simpara> The image.
 
852
</simpara></listitem></varlistentry>
 
853
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
 
854
<listitem><simpara> The layer to raise to top.
 
855
</simpara></listitem></varlistentry>
 
856
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
857
</simpara></listitem></varlistentry>
 
858
</variablelist></refsect2>
 
859
<refsect2>
 
860
<title><anchor id="gimp-image-lower-layer-to-bottom"/>gimp_image_lower_layer_to_bottom ()</title>
 
861
<indexterm><primary>gimp_image_lower_layer_to_bottom</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_lower_layer_to_bottom
 
862
                                            (<link linkend="gint32">gint32</link> image_ID,
 
863
                                             <link linkend="gint32">gint32</link> layer_ID);</programlisting>
 
864
<para>
 
865
Lower the specified layer in the image's layer stack to bottom of
 
866
stack
 
867
</para>
 
868
<para>
 
869
This procedure lowers the specified layer to bottom of the existing
 
870
layer stack. It will not move the layer if there is no layer below
 
871
it, or the layer has no alpha channel.</para>
 
872
<para>
 
873
 
 
874
</para><variablelist role="params">
 
875
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
876
<listitem><simpara> The image.
 
877
</simpara></listitem></varlistentry>
 
878
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
 
879
<listitem><simpara> The layer to lower to bottom.
 
880
</simpara></listitem></varlistentry>
 
881
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
882
</simpara></listitem></varlistentry>
 
883
</variablelist></refsect2>
 
884
<refsect2>
 
885
<title><anchor id="gimp-image-add-channel"/>gimp_image_add_channel ()</title>
 
886
<indexterm><primary>gimp_image_add_channel</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_add_channel          (<link linkend="gint32">gint32</link> image_ID,
 
887
                                             <link linkend="gint32">gint32</link> channel_ID,
 
888
                                             <link linkend="gint">gint</link> position);</programlisting>
 
889
<para>
 
890
Add the specified channel to the image.
 
891
</para>
 
892
<para>
 
893
This procedure adds the specified channel to the image. The position
 
894
channel is not currently used, so the channel is always inserted at
 
895
the top of the channel stack.</para>
 
896
<para>
 
897
 
 
898
</para><variablelist role="params">
 
899
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
900
<listitem><simpara> The image.
 
901
</simpara></listitem></varlistentry>
 
902
<varlistentry><term><parameter>channel_ID</parameter>&nbsp;:</term>
 
903
<listitem><simpara> The channel.
 
904
</simpara></listitem></varlistentry>
 
905
<varlistentry><term><parameter>position</parameter>&nbsp;:</term>
 
906
<listitem><simpara> The channel position.
 
907
</simpara></listitem></varlistentry>
 
908
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
909
</simpara></listitem></varlistentry>
 
910
</variablelist></refsect2>
 
911
<refsect2>
 
912
<title><anchor id="gimp-image-remove-channel"/>gimp_image_remove_channel ()</title>
 
913
<indexterm><primary>gimp_image_remove_channel</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_remove_channel       (<link linkend="gint32">gint32</link> image_ID,
 
914
                                             <link linkend="gint32">gint32</link> channel_ID);</programlisting>
 
915
<para>
 
916
Remove the specified channel from the image.
 
917
</para>
 
918
<para>
 
919
This procedure removes the specified channel from the image. If the
 
920
channel doesn't exist, an error is returned.</para>
 
921
<para>
 
922
 
 
923
</para><variablelist role="params">
 
924
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
925
<listitem><simpara> The image.
 
926
</simpara></listitem></varlistentry>
 
927
<varlistentry><term><parameter>channel_ID</parameter>&nbsp;:</term>
 
928
<listitem><simpara> The channel.
 
929
</simpara></listitem></varlistentry>
 
930
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
931
</simpara></listitem></varlistentry>
 
932
</variablelist></refsect2>
 
933
<refsect2>
 
934
<title><anchor id="gimp-image-raise-channel"/>gimp_image_raise_channel ()</title>
 
935
<indexterm><primary>gimp_image_raise_channel</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_raise_channel        (<link linkend="gint32">gint32</link> image_ID,
 
936
                                             <link linkend="gint32">gint32</link> channel_ID);</programlisting>
 
937
<para>
 
938
Raise the specified channel in the image's channel stack
 
939
</para>
 
940
<para>
 
941
This procedure raises the specified channel one step in the existing
 
942
channel stack. It will not move the channel if there is no channel
 
943
above it.</para>
 
944
<para>
 
945
 
 
946
</para><variablelist role="params">
 
947
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
948
<listitem><simpara> The image.
 
949
</simpara></listitem></varlistentry>
 
950
<varlistentry><term><parameter>channel_ID</parameter>&nbsp;:</term>
 
951
<listitem><simpara> The channel to raise.
 
952
</simpara></listitem></varlistentry>
 
953
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
954
</simpara></listitem></varlistentry>
 
955
</variablelist></refsect2>
 
956
<refsect2>
 
957
<title><anchor id="gimp-image-lower-channel"/>gimp_image_lower_channel ()</title>
 
958
<indexterm><primary>gimp_image_lower_channel</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_lower_channel        (<link linkend="gint32">gint32</link> image_ID,
 
959
                                             <link linkend="gint32">gint32</link> layer_ID);</programlisting>
 
960
<para>
 
961
Lower the specified layer in the image's layer stack
 
962
</para>
 
963
<para>
 
964
This procedure lowers the specified layer one step in the existing
 
965
layer stack. It will not move the layer if there is no layer below
 
966
it, or the layer has no alpha channel.</para>
 
967
<para>
 
968
 
 
969
</para><variablelist role="params">
 
970
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
971
<listitem><simpara> The image.
 
972
</simpara></listitem></varlistentry>
 
973
<varlistentry><term><parameter>layer_ID</parameter>&nbsp;:</term>
 
974
<listitem><simpara> The layer to lower.
 
975
</simpara></listitem></varlistentry>
 
976
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
977
</simpara></listitem></varlistentry>
 
978
</variablelist></refsect2>
 
979
<refsect2>
 
980
<title><anchor id="gimp-image-flatten"/>gimp_image_flatten ()</title>
 
981
<indexterm><primary>gimp_image_flatten</primary></indexterm><programlisting><link linkend="gint32">gint32</link>      gimp_image_flatten              (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
982
<para>
 
983
Flatten all visible layers into a single layer. Discard all
 
984
invisible layers.
 
985
</para>
 
986
<para>
 
987
This procedure combines the visible layers in a manner analogous to
 
988
merging with the CLIP_TO_IMAGE merge type. Non-visible layers are
 
989
discarded, and the resulting image is stripped of its alpha channel.</para>
 
990
<para>
 
991
 
 
992
</para><variablelist role="params">
 
993
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
994
<listitem><simpara> The image.
 
995
</simpara></listitem></varlistentry>
 
996
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The resulting layer.
 
997
</simpara></listitem></varlistentry>
 
998
</variablelist></refsect2>
 
999
<refsect2>
 
1000
<title><anchor id="gimp-image-merge-visible-layers"/>gimp_image_merge_visible_layers ()</title>
 
1001
<indexterm><primary>gimp_image_merge_visible_layers</primary></indexterm><programlisting><link linkend="gint32">gint32</link>      gimp_image_merge_visible_layers (<link linkend="gint32">gint32</link> image_ID,
 
1002
                                             <link linkend="GimpMergeType">GimpMergeType</link> merge_type);</programlisting>
 
1003
<para>
 
1004
Merge the visible image layers into one.
 
1005
</para>
 
1006
<para>
 
1007
This procedure combines the visible layers into a single layer using
 
1008
the specified merge type. A merge type of EXPAND_AS_NECESSARY
 
1009
expands the final layer to encompass the areas of the visible
 
1010
layers. A merge type of CLIP_TO_IMAGE clips the final layer to the
 
1011
extents of the image. A merge type of CLIP_TO_BOTTOM_LAYER clips the
 
1012
final layer to the size of the bottommost layer.</para>
 
1013
<para>
 
1014
 
 
1015
</para><variablelist role="params">
 
1016
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1017
<listitem><simpara> The image.
 
1018
</simpara></listitem></varlistentry>
 
1019
<varlistentry><term><parameter>merge_type</parameter>&nbsp;:</term>
 
1020
<listitem><simpara> The type of merge.
 
1021
</simpara></listitem></varlistentry>
 
1022
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The resulting layer.
 
1023
</simpara></listitem></varlistentry>
 
1024
</variablelist></refsect2>
 
1025
<refsect2>
 
1026
<title><anchor id="gimp-image-merge-down"/>gimp_image_merge_down ()</title>
 
1027
<indexterm><primary>gimp_image_merge_down</primary></indexterm><programlisting><link linkend="gint32">gint32</link>      gimp_image_merge_down           (<link linkend="gint32">gint32</link> image_ID,
 
1028
                                             <link linkend="gint32">gint32</link> merge_layer_ID,
 
1029
                                             <link linkend="GimpMergeType">GimpMergeType</link> merge_type);</programlisting>
 
1030
<para>
 
1031
Merge the layer passed and the first visible layer below.
 
1032
</para>
 
1033
<para>
 
1034
This procedure combines the passed layer and the first visible layer
 
1035
below it using the specified merge type. A merge type of
 
1036
EXPAND_AS_NECESSARY expands the final layer to encompass the areas
 
1037
of the visible layers. A merge type of CLIP_TO_IMAGE clips the final
 
1038
layer to the extents of the image. A merge type of
 
1039
CLIP_TO_BOTTOM_LAYER clips the final layer to the size of the
 
1040
bottommost layer.</para>
 
1041
<para>
 
1042
 
 
1043
</para><variablelist role="params">
 
1044
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1045
<listitem><simpara> The image.
 
1046
</simpara></listitem></varlistentry>
 
1047
<varlistentry><term><parameter>merge_layer_ID</parameter>&nbsp;:</term>
 
1048
<listitem><simpara> The layer to merge down from.
 
1049
</simpara></listitem></varlistentry>
 
1050
<varlistentry><term><parameter>merge_type</parameter>&nbsp;:</term>
 
1051
<listitem><simpara> The type of merge.
 
1052
</simpara></listitem></varlistentry>
 
1053
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The resulting layer.
 
1054
</simpara></listitem></varlistentry>
 
1055
</variablelist></refsect2>
 
1056
<refsect2>
 
1057
<title><anchor id="gimp-image-clean-all"/>gimp_image_clean_all ()</title>
 
1058
<indexterm><primary>gimp_image_clean_all</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_clean_all            (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
1059
<para>
 
1060
Set the image dirty count to 0.
 
1061
</para>
 
1062
<para>
 
1063
This procedure sets the specified image's dirty count to 0, allowing
 
1064
operations to occur without having a 'dirtied' image. This is
 
1065
especially useful for creating and loading images which should not
 
1066
initially be considered dirty, even though layers must be created,
 
1067
filled, and installed in the image.</para>
 
1068
<para>
 
1069
 
 
1070
</para><variablelist role="params">
 
1071
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1072
<listitem><simpara> The image.
 
1073
</simpara></listitem></varlistentry>
 
1074
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1075
</simpara></listitem></varlistentry>
 
1076
</variablelist></refsect2>
 
1077
<refsect2>
 
1078
<title><anchor id="gimp-image-is-dirty"/>gimp_image_is_dirty ()</title>
 
1079
<indexterm><primary>gimp_image_is_dirty</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_is_dirty             (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
1080
<para>
 
1081
Checks if the image has unsaved changes.
 
1082
</para>
 
1083
<para>
 
1084
This procedure checks the specified image's dirty count to see if it
 
1085
needs to be saved.</para>
 
1086
<para>
 
1087
 
 
1088
</para><variablelist role="params">
 
1089
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1090
<listitem><simpara> The image.
 
1091
</simpara></listitem></varlistentry>
 
1092
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> True if the image has unsaved changes.
 
1093
</simpara></listitem></varlistentry>
 
1094
</variablelist></refsect2>
 
1095
<refsect2>
 
1096
<title><anchor id="gimp-image-get-active-layer"/>gimp_image_get_active_layer ()</title>
 
1097
<indexterm><primary>gimp_image_get_active_layer</primary></indexterm><programlisting><link linkend="gint32">gint32</link>      gimp_image_get_active_layer     (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
1098
<para>
 
1099
Returns the specified image's active layer.
 
1100
</para>
 
1101
<para>
 
1102
If there is an active layer, its ID will be returned, otherwise, -1.
 
1103
If a channel is currently active, then no layer will be. If a layer
 
1104
mask is active, then this will return the associated layer.</para>
 
1105
<para>
 
1106
 
 
1107
</para><variablelist role="params">
 
1108
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1109
<listitem><simpara> The image.
 
1110
</simpara></listitem></varlistentry>
 
1111
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The active layer.
 
1112
</simpara></listitem></varlistentry>
 
1113
</variablelist></refsect2>
 
1114
<refsect2>
 
1115
<title><anchor id="gimp-image-set-active-layer"/>gimp_image_set_active_layer ()</title>
 
1116
<indexterm><primary>gimp_image_set_active_layer</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_active_layer     (<link linkend="gint32">gint32</link> image_ID,
 
1117
                                             <link linkend="gint32">gint32</link> active_layer_ID);</programlisting>
 
1118
<para>
 
1119
Sets the specified image's active layer.
 
1120
</para>
 
1121
<para>
 
1122
If the layer exists, it is set as the active layer in the image. Any
 
1123
previous active layer or channel is set to inactive. An exception is
 
1124
a previously existing floating selection, in which case this
 
1125
procedure will return an execution error.</para>
 
1126
<para>
 
1127
 
 
1128
</para><variablelist role="params">
 
1129
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1130
<listitem><simpara> The image.
 
1131
</simpara></listitem></varlistentry>
 
1132
<varlistentry><term><parameter>active_layer_ID</parameter>&nbsp;:</term>
 
1133
<listitem><simpara> The new image active layer.
 
1134
</simpara></listitem></varlistentry>
 
1135
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1136
</simpara></listitem></varlistentry>
 
1137
</variablelist></refsect2>
 
1138
<refsect2>
 
1139
<title><anchor id="gimp-image-get-active-channel"/>gimp_image_get_active_channel ()</title>
 
1140
<indexterm><primary>gimp_image_get_active_channel</primary></indexterm><programlisting><link linkend="gint32">gint32</link>      gimp_image_get_active_channel   (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
1141
<para>
 
1142
Returns the specified image's active channel.
 
1143
</para>
 
1144
<para>
 
1145
If there is an active channel, this will return the channel ID,
 
1146
otherwise, -1.</para>
 
1147
<para>
 
1148
 
 
1149
</para><variablelist role="params">
 
1150
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1151
<listitem><simpara> The image.
 
1152
</simpara></listitem></varlistentry>
 
1153
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The active channel.
 
1154
</simpara></listitem></varlistentry>
 
1155
</variablelist></refsect2>
 
1156
<refsect2>
 
1157
<title><anchor id="gimp-image-set-active-channel"/>gimp_image_set_active_channel ()</title>
 
1158
<indexterm><primary>gimp_image_set_active_channel</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_active_channel   (<link linkend="gint32">gint32</link> image_ID,
 
1159
                                             <link linkend="gint32">gint32</link> active_channel_ID);</programlisting>
 
1160
<para>
 
1161
Sets the specified image's active channel.
 
1162
</para>
 
1163
<para>
 
1164
If the channel exists, it is set as the active channel in the image.
 
1165
Any previous active channel or channel is set to inactive. An
 
1166
exception is a previously existing floating selection, in which case
 
1167
this procedure will return an execution error.</para>
 
1168
<para>
 
1169
 
 
1170
</para><variablelist role="params">
 
1171
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1172
<listitem><simpara> The image.
 
1173
</simpara></listitem></varlistentry>
 
1174
<varlistentry><term><parameter>active_channel_ID</parameter>&nbsp;:</term>
 
1175
<listitem><simpara> The new image active channel.
 
1176
</simpara></listitem></varlistentry>
 
1177
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1178
</simpara></listitem></varlistentry>
 
1179
</variablelist></refsect2>
 
1180
<refsect2>
 
1181
<title><anchor id="gimp-image-get-selection"/>gimp_image_get_selection ()</title>
 
1182
<indexterm><primary>gimp_image_get_selection</primary></indexterm><programlisting><link linkend="gint32">gint32</link>      gimp_image_get_selection        (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
1183
<para>
 
1184
Returns the specified image's selection.
 
1185
</para>
 
1186
<para>
 
1187
This will always return a valid ID for a selection -- which is
 
1188
represented as a channel internally.</para>
 
1189
<para>
 
1190
 
 
1191
</para><variablelist role="params">
 
1192
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1193
<listitem><simpara> The image.
 
1194
</simpara></listitem></varlistentry>
 
1195
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The selection channel.
 
1196
</simpara></listitem></varlistentry>
 
1197
</variablelist></refsect2>
 
1198
<refsect2>
 
1199
<title><anchor id="gimp-image-get-component-active"/>gimp_image_get_component_active ()</title>
 
1200
<indexterm><primary>gimp_image_get_component_active</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_get_component_active (<link linkend="gint32">gint32</link> image_ID,
 
1201
                                             <link linkend="GimpChannelType">GimpChannelType</link> component);</programlisting>
 
1202
<para>
 
1203
Returns if the specified image's image component is active.
 
1204
</para>
 
1205
<para>
 
1206
This procedure returns if the specified image's image component
 
1207
(i.e. Red, Green, Blue intensity channels in an RGB image) is active
 
1208
or inactive -- whether or not it can be modified. If the specified
 
1209
component is not valid for the image type, an error is returned.</para>
 
1210
<para>
 
1211
 
 
1212
</para><variablelist role="params">
 
1213
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1214
<listitem><simpara> The image.
 
1215
</simpara></listitem></varlistentry>
 
1216
<varlistentry><term><parameter>component</parameter>&nbsp;:</term>
 
1217
<listitem><simpara> The image component.
 
1218
</simpara></listitem></varlistentry>
 
1219
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> Component is active.
 
1220
</simpara></listitem></varlistentry>
 
1221
</variablelist></refsect2>
 
1222
<refsect2>
 
1223
<title><anchor id="gimp-image-set-component-active"/>gimp_image_set_component_active ()</title>
 
1224
<indexterm><primary>gimp_image_set_component_active</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_component_active (<link linkend="gint32">gint32</link> image_ID,
 
1225
                                             <link linkend="GimpChannelType">GimpChannelType</link> component,
 
1226
                                             <link linkend="gboolean">gboolean</link> active);</programlisting>
 
1227
<para>
 
1228
Sets if the specified image's image component is active.
 
1229
</para>
 
1230
<para>
 
1231
This procedure sets if the specified image's image component (i.e.
 
1232
Red, Green, Blue intensity channels in an RGB image) is active or
 
1233
inactive -- whether or not it can be modified. If the specified
 
1234
component is not valid for the image type, an error is returned.</para>
 
1235
<para>
 
1236
 
 
1237
</para><variablelist role="params">
 
1238
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1239
<listitem><simpara> The image.
 
1240
</simpara></listitem></varlistentry>
 
1241
<varlistentry><term><parameter>component</parameter>&nbsp;:</term>
 
1242
<listitem><simpara> The image component.
 
1243
</simpara></listitem></varlistentry>
 
1244
<varlistentry><term><parameter>active</parameter>&nbsp;:</term>
 
1245
<listitem><simpara> Component is active.
 
1246
</simpara></listitem></varlistentry>
 
1247
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1248
</simpara></listitem></varlistentry>
 
1249
</variablelist></refsect2>
 
1250
<refsect2>
 
1251
<title><anchor id="gimp-image-get-component-visible"/>gimp_image_get_component_visible ()</title>
 
1252
<indexterm><primary>gimp_image_get_component_visible</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_get_component_visible
 
1253
                                            (<link linkend="gint32">gint32</link> image_ID,
 
1254
                                             <link linkend="GimpChannelType">GimpChannelType</link> component);</programlisting>
 
1255
<para>
 
1256
Returns if the specified image's image component is visible.
 
1257
</para>
 
1258
<para>
 
1259
This procedure returns if the specified image's image component
 
1260
(i.e. Red, Green, Blue intensity channels in an RGB image) is
 
1261
visible or invisible -- whether or not it can be seen. If the
 
1262
specified component is not valid for the image type, an error is
 
1263
returned.</para>
 
1264
<para>
 
1265
 
 
1266
</para><variablelist role="params">
 
1267
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1268
<listitem><simpara> The image.
 
1269
</simpara></listitem></varlistentry>
 
1270
<varlistentry><term><parameter>component</parameter>&nbsp;:</term>
 
1271
<listitem><simpara> The image component.
 
1272
</simpara></listitem></varlistentry>
 
1273
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> Component is visible.
 
1274
</simpara></listitem></varlistentry>
 
1275
</variablelist></refsect2>
 
1276
<refsect2>
 
1277
<title><anchor id="gimp-image-set-component-visible"/>gimp_image_set_component_visible ()</title>
 
1278
<indexterm><primary>gimp_image_set_component_visible</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_component_visible
 
1279
                                            (<link linkend="gint32">gint32</link> image_ID,
 
1280
                                             <link linkend="GimpChannelType">GimpChannelType</link> component,
 
1281
                                             <link linkend="gboolean">gboolean</link> visible);</programlisting>
 
1282
<para>
 
1283
Sets if the specified image's image component is visible.
 
1284
</para>
 
1285
<para>
 
1286
This procedure sets if the specified image's image component (i.e.
 
1287
Red, Green, Blue intensity channels in an RGB image) is visible or
 
1288
invisible -- whether or not it can be seen. If the specified
 
1289
component is not valid for the image type, an error is returned.</para>
 
1290
<para>
 
1291
 
 
1292
</para><variablelist role="params">
 
1293
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1294
<listitem><simpara> The image.
 
1295
</simpara></listitem></varlistentry>
 
1296
<varlistentry><term><parameter>component</parameter>&nbsp;:</term>
 
1297
<listitem><simpara> The image component.
 
1298
</simpara></listitem></varlistentry>
 
1299
<varlistentry><term><parameter>visible</parameter>&nbsp;:</term>
 
1300
<listitem><simpara> Component is visible.
 
1301
</simpara></listitem></varlistentry>
 
1302
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1303
</simpara></listitem></varlistentry>
 
1304
</variablelist></refsect2>
 
1305
<refsect2>
 
1306
<title><anchor id="gimp-image-get-filename"/>gimp_image_get_filename ()</title>
 
1307
<indexterm><primary>gimp_image_get_filename</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*      gimp_image_get_filename         (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
1308
<para>
 
1309
Returns the specified image's filename.
 
1310
</para>
 
1311
<para>
 
1312
This procedure returns the specified image's filename in the
 
1313
filesystem encoding. The image has a filename only if it was loaded
 
1314
or has since been saved. Otherwise, this function returns <literal>NULL</literal>.</para>
 
1315
<para>
 
1316
 
 
1317
</para><variablelist role="params">
 
1318
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1319
<listitem><simpara> The image.
 
1320
</simpara></listitem></varlistentry>
 
1321
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The filename.
 
1322
</simpara></listitem></varlistentry>
 
1323
</variablelist></refsect2>
 
1324
<refsect2>
 
1325
<title><anchor id="gimp-image-set-filename"/>gimp_image_set_filename ()</title>
 
1326
<indexterm><primary>gimp_image_set_filename</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_filename         (<link linkend="gint32">gint32</link> image_ID,
 
1327
                                             const <link linkend="gchar">gchar</link> *filename);</programlisting>
 
1328
<para>
 
1329
Sets the specified image's filename.
 
1330
</para>
 
1331
<para>
 
1332
This procedure sets the specified image's filename. The filename
 
1333
should be in the filesystem encoding.</para>
 
1334
<para>
 
1335
 
 
1336
</para><variablelist role="params">
 
1337
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1338
<listitem><simpara> The image.
 
1339
</simpara></listitem></varlistentry>
 
1340
<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
 
1341
<listitem><simpara> The new image filename.
 
1342
</simpara></listitem></varlistentry>
 
1343
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1344
</simpara></listitem></varlistentry>
 
1345
</variablelist></refsect2>
 
1346
<refsect2>
 
1347
<title><anchor id="gimp-image-get-name"/>gimp_image_get_name ()</title>
 
1348
<indexterm><primary>gimp_image_get_name</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*      gimp_image_get_name             (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
1349
<para>
 
1350
Returns the specified image's name.
 
1351
</para>
 
1352
<para>
 
1353
This procedure returns the specified image's name.</para>
 
1354
<para>
 
1355
 
 
1356
</para><variablelist role="params">
 
1357
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1358
<listitem><simpara> The image.
 
1359
</simpara></listitem></varlistentry>
 
1360
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The name.
 
1361
</simpara></listitem></varlistentry>
 
1362
</variablelist></refsect2>
 
1363
<refsect2>
 
1364
<title><anchor id="gimp-image-get-resolution"/>gimp_image_get_resolution ()</title>
 
1365
<indexterm><primary>gimp_image_get_resolution</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_get_resolution       (<link linkend="gint32">gint32</link> image_ID,
 
1366
                                             <link linkend="gdouble">gdouble</link> *xresolution,
 
1367
                                             <link linkend="gdouble">gdouble</link> *yresolution);</programlisting>
 
1368
<para>
 
1369
Returns the specified image's resolution.
 
1370
</para>
 
1371
<para>
 
1372
This procedure returns the specified image's resolution in dots per
 
1373
inch. This value is independent of any of the layers in this image.</para>
 
1374
<para>
 
1375
 
 
1376
</para><variablelist role="params">
 
1377
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1378
<listitem><simpara> The image.
 
1379
</simpara></listitem></varlistentry>
 
1380
<varlistentry><term><parameter>xresolution</parameter>&nbsp;:</term>
 
1381
<listitem><simpara> The resolutionin the x-axis, in dots per inch.
 
1382
</simpara></listitem></varlistentry>
 
1383
<varlistentry><term><parameter>yresolution</parameter>&nbsp;:</term>
 
1384
<listitem><simpara> The resolutionin the y-axis, in dots per inch.
 
1385
</simpara></listitem></varlistentry>
 
1386
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1387
</simpara></listitem></varlistentry>
 
1388
</variablelist></refsect2>
 
1389
<refsect2>
 
1390
<title><anchor id="gimp-image-set-resolution"/>gimp_image_set_resolution ()</title>
 
1391
<indexterm><primary>gimp_image_set_resolution</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_resolution       (<link linkend="gint32">gint32</link> image_ID,
 
1392
                                             <link linkend="gdouble">gdouble</link> xresolution,
 
1393
                                             <link linkend="gdouble">gdouble</link> yresolution);</programlisting>
 
1394
<para>
 
1395
Sets the specified image's resolution.
 
1396
</para>
 
1397
<para>
 
1398
This procedure sets the specified image's resolution in dots per
 
1399
inch. This value is independent of any of the layers in this image.
 
1400
No scaling or resizing is performed.</para>
 
1401
<para>
 
1402
 
 
1403
</para><variablelist role="params">
 
1404
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1405
<listitem><simpara> The image.
 
1406
</simpara></listitem></varlistentry>
 
1407
<varlistentry><term><parameter>xresolution</parameter>&nbsp;:</term>
 
1408
<listitem><simpara> The new image resolution in the x-axis, in dots per inch.
 
1409
</simpara></listitem></varlistentry>
 
1410
<varlistentry><term><parameter>yresolution</parameter>&nbsp;:</term>
 
1411
<listitem><simpara> The new image resolution in the y-axis, in dots per inch.
 
1412
</simpara></listitem></varlistentry>
 
1413
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1414
</simpara></listitem></varlistentry>
 
1415
</variablelist></refsect2>
 
1416
<refsect2>
 
1417
<title><anchor id="gimp-image-get-unit"/>gimp_image_get_unit ()</title>
 
1418
<indexterm><primary>gimp_image_get_unit</primary></indexterm><programlisting><link linkend="GimpUnit">GimpUnit</link>    gimp_image_get_unit             (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
1419
<para>
 
1420
Returns the specified image's unit.
 
1421
</para>
 
1422
<para>
 
1423
This procedure returns the specified image's unit. This value is
 
1424
independent of any of the layers in this image. See the gimp_unit_*
 
1425
procedure definitions for the valid range of unit IDs and a
 
1426
description of the unit system.</para>
 
1427
<para>
 
1428
 
 
1429
</para><variablelist role="params">
 
1430
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1431
<listitem><simpara> The image.
 
1432
</simpara></listitem></varlistentry>
 
1433
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The unit.
 
1434
</simpara></listitem></varlistentry>
 
1435
</variablelist></refsect2>
 
1436
<refsect2>
 
1437
<title><anchor id="gimp-image-set-unit"/>gimp_image_set_unit ()</title>
 
1438
<indexterm><primary>gimp_image_set_unit</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_unit             (<link linkend="gint32">gint32</link> image_ID,
 
1439
                                             <link linkend="GimpUnit">GimpUnit</link> unit);</programlisting>
 
1440
<para>
 
1441
Sets the specified image's unit.
 
1442
</para>
 
1443
<para>
 
1444
This procedure sets the specified image's unit. No scaling or
 
1445
resizing is performed. This value is independent of any of the
 
1446
layers in this image. See the gimp_unit_* procedure definitions for
 
1447
the valid range of unit IDs and a description of the unit system.</para>
 
1448
<para>
 
1449
 
 
1450
</para><variablelist role="params">
 
1451
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1452
<listitem><simpara> The image.
 
1453
</simpara></listitem></varlistentry>
 
1454
<varlistentry><term><parameter>unit</parameter>&nbsp;:</term>
 
1455
<listitem><simpara> The new image unit.
 
1456
</simpara></listitem></varlistentry>
 
1457
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1458
</simpara></listitem></varlistentry>
 
1459
</variablelist></refsect2>
 
1460
<refsect2>
 
1461
<title><anchor id="gimp-image-set-tattoo-state"/>gimp_image_set_tattoo_state ()</title>
 
1462
<indexterm><primary>gimp_image_set_tattoo_state</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_tattoo_state     (<link linkend="gint32">gint32</link> image_ID,
 
1463
                                             <link linkend="gint">gint</link> tattoo_state);</programlisting>
 
1464
<para>
 
1465
Set the tattoo state associated with the image.
 
1466
</para>
 
1467
<para>
 
1468
This procedure sets the tattoo state of the image. Use only by
 
1469
save/load plugins that wish to preserve an images tattoo state.
 
1470
Using this function at other times will produce unexpected results.
 
1471
A full check of uniqueness of states in layers, channels and paths
 
1472
will be performed by this procedure and a execution failure will be
 
1473
returned if this fails. A failure will also be returned if the new
 
1474
tattoo state value is less than the maximum tattoo value from all of
 
1475
the tattoos from the paths, layers and channels. After the image
 
1476
data has been loaded and all the tattoos have been set then this is
 
1477
the last procedure that should be called. If effectively does a
 
1478
status check on the tattoo values that have been set to make sure
 
1479
that all is OK.</para>
 
1480
<para>
 
1481
 
 
1482
</para><variablelist role="params">
 
1483
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1484
<listitem><simpara> The image.
 
1485
</simpara></listitem></varlistentry>
 
1486
<varlistentry><term><parameter>tattoo_state</parameter>&nbsp;:</term>
 
1487
<listitem><simpara> The new image tattoo_state.
 
1488
</simpara></listitem></varlistentry>
 
1489
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1490
</simpara></listitem></varlistentry>
 
1491
</variablelist></refsect2>
 
1492
<refsect2>
 
1493
<title><anchor id="gimp-image-get-tattoo-state"/>gimp_image_get_tattoo_state ()</title>
 
1494
<indexterm><primary>gimp_image_get_tattoo_state</primary></indexterm><programlisting><link linkend="gint">gint</link>        gimp_image_get_tattoo_state     (<link linkend="gint32">gint32</link> image_ID);</programlisting>
 
1495
<para>
 
1496
Returns the tattoo state associated with the image.
 
1497
</para>
 
1498
<para>
 
1499
This procedure returns the tattoo state of the image. Use only by
 
1500
save/load plugins that wish to preserve an images tattoo state.
 
1501
Using this function at other times will produce unexpected results.</para>
 
1502
<para>
 
1503
 
 
1504
</para><variablelist role="params">
 
1505
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1506
<listitem><simpara> The image.
 
1507
</simpara></listitem></varlistentry>
 
1508
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The tattoo_state.
 
1509
</simpara></listitem></varlistentry>
 
1510
</variablelist></refsect2>
 
1511
<refsect2>
 
1512
<title><anchor id="gimp-image-get-layer-by-tattoo"/>gimp_image_get_layer_by_tattoo ()</title>
 
1513
<indexterm><primary>gimp_image_get_layer_by_tattoo</primary></indexterm><programlisting><link linkend="gint32">gint32</link>      gimp_image_get_layer_by_tattoo  (<link linkend="gint32">gint32</link> image_ID,
 
1514
                                             <link linkend="gint">gint</link> tattoo);</programlisting>
 
1515
<para>
 
1516
Find a layer with a given tattoo in an image.
 
1517
</para>
 
1518
<para>
 
1519
This procedure returns the layer with the given tattoo in the
 
1520
specified image.</para>
 
1521
<para>
 
1522
 
 
1523
</para><variablelist role="params">
 
1524
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1525
<listitem><simpara> The image.
 
1526
</simpara></listitem></varlistentry>
 
1527
<varlistentry><term><parameter>tattoo</parameter>&nbsp;:</term>
 
1528
<listitem><simpara> The tattoo of the layer to find.
 
1529
</simpara></listitem></varlistentry>
 
1530
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The layer with the specified tattoo.
 
1531
</simpara></listitem></varlistentry>
 
1532
</variablelist></refsect2>
 
1533
<refsect2>
 
1534
<title><anchor id="gimp-image-get-channel-by-tattoo"/>gimp_image_get_channel_by_tattoo ()</title>
 
1535
<indexterm><primary>gimp_image_get_channel_by_tattoo</primary></indexterm><programlisting><link linkend="gint32">gint32</link>      gimp_image_get_channel_by_tattoo
 
1536
                                            (<link linkend="gint32">gint32</link> image_ID,
 
1537
                                             <link linkend="gint">gint</link> tattoo);</programlisting>
 
1538
<para>
 
1539
Find a channel with a given tattoo in an image.
 
1540
</para>
 
1541
<para>
 
1542
This procedure returns the channel with the given tattoo in the
 
1543
specified image.</para>
 
1544
<para>
 
1545
 
 
1546
</para><variablelist role="params">
 
1547
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1548
<listitem><simpara> The image.
 
1549
</simpara></listitem></varlistentry>
 
1550
<varlistentry><term><parameter>tattoo</parameter>&nbsp;:</term>
 
1551
<listitem><simpara> The tattoo of the channel to find.
 
1552
</simpara></listitem></varlistentry>
 
1553
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The channel with the specified tattoo.
 
1554
</simpara></listitem></varlistentry>
 
1555
</variablelist></refsect2>
 
1556
<refsect2>
 
1557
<title><anchor id="gimp-image-get-cmap"/>gimp_image_get_cmap ()</title>
 
1558
<indexterm role="deprecated"><primary>gimp_image_get_cmap</primary></indexterm><programlisting><link linkend="guchar">guchar</link>*     gimp_image_get_cmap             (<link linkend="gint32">gint32</link> image_ID,
 
1559
                                             <link linkend="gint">gint</link> *num_colors);</programlisting>
 
1560
<warning><para><literal>gimp_image_get_cmap</literal> is deprecated and should not be used in newly-written code.</para></warning>
 
1561
<para>
 
1562
This procedure is deprecated! Use <link linkend="gimp-image-get-colormap"><function>gimp_image_get_colormap()</function></link> instead.</para>
 
1563
<para>
 
1564
 
 
1565
</para><variablelist role="params">
 
1566
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1567
<listitem><simpara>   The image.
 
1568
</simpara></listitem></varlistentry>
 
1569
<varlistentry><term><parameter>num_colors</parameter>&nbsp;:</term>
 
1570
<listitem><simpara> Number of colors in the colormap array.
 
1571
</simpara></listitem></varlistentry>
 
1572
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The image's colormap.
 
1573
</simpara></listitem></varlistentry>
 
1574
</variablelist></refsect2>
 
1575
<refsect2>
 
1576
<title><anchor id="gimp-image-set-cmap"/>gimp_image_set_cmap ()</title>
 
1577
<indexterm role="deprecated"><primary>gimp_image_set_cmap</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_cmap             (<link linkend="gint32">gint32</link> image_ID,
 
1578
                                             const <link linkend="guchar">guchar</link> *cmap,
 
1579
                                             <link linkend="gint">gint</link> num_colors);</programlisting>
 
1580
<warning><para><literal>gimp_image_set_cmap</literal> is deprecated and should not be used in newly-written code.</para></warning>
 
1581
<para>
 
1582
This procedure is deprecated! Use <link linkend="gimp-image-set-colormap"><function>gimp_image_set_colormap()</function></link> instead.</para>
 
1583
<para>
 
1584
 
 
1585
</para><variablelist role="params">
 
1586
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1587
<listitem><simpara>   The image.
 
1588
</simpara></listitem></varlistentry>
 
1589
<varlistentry><term><parameter>cmap</parameter>&nbsp;:</term>
 
1590
<listitem><simpara>       The new colormap values.
 
1591
</simpara></listitem></varlistentry>
 
1592
<varlistentry><term><parameter>num_colors</parameter>&nbsp;:</term>
 
1593
<listitem><simpara> Number of colors in the colormap array.
 
1594
</simpara></listitem></varlistentry>
 
1595
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1596
</simpara></listitem></varlistentry>
 
1597
</variablelist></refsect2>
 
1598
<refsect2>
 
1599
<title><anchor id="gimp-image-get-colormap"/>gimp_image_get_colormap ()</title>
 
1600
<indexterm><primary>gimp_image_get_colormap</primary></indexterm><programlisting><link linkend="guchar">guchar</link>*     gimp_image_get_colormap         (<link linkend="gint32">gint32</link> image_ID,
 
1601
                                             <link linkend="gint">gint</link> *num_colors);</programlisting>
 
1602
<para>
 
1603
Returns the image's colormap
 
1604
</para>
 
1605
<para>
 
1606
This procedure returns an actual pointer to the image's colormap, as
 
1607
well as the number of colors contained in the colormap. If the image
 
1608
is not of base type INDEXED, this pointer will be NULL.</para>
 
1609
<para>
 
1610
 
 
1611
</para><variablelist role="params">
 
1612
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1613
<listitem><simpara>   The image.
 
1614
</simpara></listitem></varlistentry>
 
1615
<varlistentry><term><parameter>num_colors</parameter>&nbsp;:</term>
 
1616
<listitem><simpara> Number of colors in the colormap array.
 
1617
</simpara></listitem></varlistentry>
 
1618
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The image's colormap.
 
1619
</simpara></listitem></varlistentry>
 
1620
</variablelist></refsect2>
 
1621
<refsect2>
 
1622
<title><anchor id="gimp-image-set-colormap"/>gimp_image_set_colormap ()</title>
 
1623
<indexterm><primary>gimp_image_set_colormap</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_set_colormap         (<link linkend="gint32">gint32</link> image_ID,
 
1624
                                             const <link linkend="guchar">guchar</link> *colormap,
 
1625
                                             <link linkend="gint">gint</link> num_colors);</programlisting>
 
1626
<para>
 
1627
Sets the entries in the image's colormap.
 
1628
</para>
 
1629
<para>
 
1630
This procedure sets the entries in the specified image's colormap.
 
1631
The number of colors is specified by the \"num_colors\" parameter
 
1632
and corresponds to the number of INT8 triples that must be contained
 
1633
in the \"cmap\" array.</para>
 
1634
<para>
 
1635
 
 
1636
</para><variablelist role="params">
 
1637
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1638
<listitem><simpara>   The image.
 
1639
</simpara></listitem></varlistentry>
 
1640
<varlistentry><term><parameter>colormap</parameter>&nbsp;:</term>
 
1641
<listitem><simpara>   The new colormap values.
 
1642
</simpara></listitem></varlistentry>
 
1643
<varlistentry><term><parameter>num_colors</parameter>&nbsp;:</term>
 
1644
<listitem><simpara> Number of colors in the colormap array.
 
1645
</simpara></listitem></varlistentry>
 
1646
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1647
</simpara></listitem></varlistentry>
 
1648
</variablelist></refsect2>
 
1649
<refsect2>
 
1650
<title><anchor id="gimp-image-get-thumbnail-data"/>gimp_image_get_thumbnail_data ()</title>
 
1651
<indexterm><primary>gimp_image_get_thumbnail_data</primary></indexterm><programlisting><link linkend="guchar">guchar</link>*     gimp_image_get_thumbnail_data   (<link linkend="gint32">gint32</link> image_ID,
 
1652
                                             <link linkend="gint">gint</link> *width,
 
1653
                                             <link linkend="gint">gint</link> *height,
 
1654
                                             <link linkend="gint">gint</link> *bpp);</programlisting>
 
1655
<para>
 
1656
 
 
1657
</para><variablelist role="params">
 
1658
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1659
<listitem><simpara>
 
1660
</simpara></listitem></varlistentry>
 
1661
<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
 
1662
<listitem><simpara>
 
1663
</simpara></listitem></varlistentry>
 
1664
<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
 
1665
<listitem><simpara>
 
1666
</simpara></listitem></varlistentry>
 
1667
<varlistentry><term><parameter>bpp</parameter>&nbsp;:</term>
 
1668
<listitem><simpara>
 
1669
</simpara></listitem></varlistentry>
 
1670
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>
 
1671
 
 
1672
 
 
1673
</simpara></listitem></varlistentry>
 
1674
</variablelist></refsect2>
 
1675
<refsect2>
 
1676
<title><anchor id="gimp-image-parasite-find"/>gimp_image_parasite_find ()</title>
 
1677
<indexterm><primary>gimp_image_parasite_find</primary></indexterm><programlisting><link linkend="GimpParasite">GimpParasite</link>* gimp_image_parasite_find      (<link linkend="gint32">gint32</link> image_ID,
 
1678
                                             const <link linkend="gchar">gchar</link> *name);</programlisting>
 
1679
<para>
 
1680
Finds the named parasite in an image
 
1681
</para>
 
1682
<para>
 
1683
Finds and returns the named parasite that was previously attached to
 
1684
an image.</para>
 
1685
<para>
 
1686
 
 
1687
</para><variablelist role="params">
 
1688
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1689
<listitem><simpara> The image.
 
1690
</simpara></listitem></varlistentry>
 
1691
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
 
1692
<listitem><simpara> The name of the parasite to find.
 
1693
</simpara></listitem></varlistentry>
 
1694
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The found parasite.
 
1695
</simpara></listitem></varlistentry>
 
1696
</variablelist></refsect2>
 
1697
<refsect2>
 
1698
<title><anchor id="gimp-image-parasite-list"/>gimp_image_parasite_list ()</title>
 
1699
<indexterm><primary>gimp_image_parasite_list</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_parasite_list        (<link linkend="gint32">gint32</link> image_ID,
 
1700
                                             <link linkend="gint">gint</link> *num_parasites,
 
1701
                                             <link linkend="gchar">gchar</link> ***parasites);</programlisting>
 
1702
<para>
 
1703
List all parasites.
 
1704
</para>
 
1705
<para>
 
1706
Returns a list of all currently attached parasites.</para>
 
1707
<para>
 
1708
 
 
1709
</para><variablelist role="params">
 
1710
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1711
<listitem><simpara> The image.
 
1712
</simpara></listitem></varlistentry>
 
1713
<varlistentry><term><parameter>num_parasites</parameter>&nbsp;:</term>
 
1714
<listitem><simpara> The number of attached parasites.
 
1715
</simpara></listitem></varlistentry>
 
1716
<varlistentry><term><parameter>parasites</parameter>&nbsp;:</term>
 
1717
<listitem><simpara> The names of currently attached parasites.
 
1718
</simpara></listitem></varlistentry>
 
1719
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1720
</simpara></listitem></varlistentry>
 
1721
</variablelist></refsect2>
 
1722
<refsect2>
 
1723
<title><anchor id="gimp-image-parasite-attach"/>gimp_image_parasite_attach ()</title>
 
1724
<indexterm><primary>gimp_image_parasite_attach</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_parasite_attach      (<link linkend="gint32">gint32</link> image_ID,
 
1725
                                             <link linkend="GimpParasite">GimpParasite</link> *parasite);</programlisting>
 
1726
<para>
 
1727
Add a parasite to an image.
 
1728
</para>
 
1729
<para>
 
1730
This procedure attaches a parasite to an image. It has no return
 
1731
values.</para>
 
1732
<para>
 
1733
 
 
1734
</para><variablelist role="params">
 
1735
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1736
<listitem><simpara> The image.
 
1737
</simpara></listitem></varlistentry>
 
1738
<varlistentry><term><parameter>parasite</parameter>&nbsp;:</term>
 
1739
<listitem><simpara> The parasite to attach to an image.
 
1740
</simpara></listitem></varlistentry>
 
1741
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1742
</simpara></listitem></varlistentry>
 
1743
</variablelist></refsect2>
 
1744
<refsect2>
 
1745
<title><anchor id="gimp-image-parasite-detach"/>gimp_image_parasite_detach ()</title>
 
1746
<indexterm><primary>gimp_image_parasite_detach</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gimp_image_parasite_detach      (<link linkend="gint32">gint32</link> image_ID,
 
1747
                                             const <link linkend="gchar">gchar</link> *name);</programlisting>
 
1748
<para>
 
1749
Removes a parasite from an image.
 
1750
</para>
 
1751
<para>
 
1752
This procedure detaches a parasite from an image. It has no return
 
1753
values.</para>
 
1754
<para>
 
1755
 
 
1756
</para><variablelist role="params">
 
1757
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1758
<listitem><simpara> The image.
 
1759
</simpara></listitem></varlistentry>
 
1760
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
 
1761
<listitem><simpara> The name of the parasite to detach from an image.
 
1762
</simpara></listitem></varlistentry>
 
1763
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success.
 
1764
</simpara></listitem></varlistentry>
 
1765
</variablelist></refsect2>
 
1766
<refsect2>
 
1767
<title><anchor id="gimp-image-attach-new-parasite"/>gimp_image_attach_new_parasite ()</title>
 
1768
<indexterm><primary>gimp_image_attach_new_parasite</primary></indexterm><programlisting><link linkend="void">void</link>        gimp_image_attach_new_parasite  (<link linkend="gint32">gint32</link> image_ID,
 
1769
                                             const <link linkend="gchar">gchar</link> *name,
 
1770
                                             <link linkend="gint">gint</link> flags,
 
1771
                                             <link linkend="gint">gint</link> size,
 
1772
                                             <link linkend="gconstpointer">gconstpointer</link> data);</programlisting>
 
1773
<para>
 
1774
Convenience function that creates a parasite and attaches it
 
1775
to the GIMP.
 
1776
</para>
 
1777
<para>
 
1778
See Also: <link linkend="gimp-image-parasite-attach"><function>gimp_image_parasite_attach()</function></link></para>
 
1779
<para>
 
1780
 
 
1781
</para><variablelist role="params">
 
1782
<varlistentry><term><parameter>image_ID</parameter>&nbsp;:</term>
 
1783
<listitem><simpara> the ID of the image to attach the <link linkend="GimpParasite"><type>GimpParasite</type></link> to.
 
1784
</simpara></listitem></varlistentry>
 
1785
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
 
1786
<listitem><simpara> the name of the <link linkend="GimpParasite"><type>GimpParasite</type></link> to create and attach.
 
1787
</simpara></listitem></varlistentry>
 
1788
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
 
1789
<listitem><simpara> the flags set on the <link linkend="GimpParasite"><type>GimpParasite</type></link>.
 
1790
</simpara></listitem></varlistentry>
 
1791
<varlistentry><term><parameter>size</parameter>&nbsp;:</term>
 
1792
<listitem><simpara> the size of the parasite data in bytes.
 
1793
</simpara></listitem></varlistentry>
 
1794
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
 
1795
<listitem><simpara> a pointer to the data attached with the <link linkend="GimpParasite"><type>GimpParasite</type></link>.
 
1796
</simpara></listitem></varlistentry>
 
1797
</variablelist></refsect2>
 
1798
 
 
1799
</refsect1>
 
1800
 
 
1801
 
 
1802
 
 
1803
 
 
1804
</refentry>