3
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4
<title>gimpchannel</title>
5
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
6
<link rel="start" href="index.html" title="GIMP Library Reference Manual">
7
<link rel="up" href="libgimp-image.html" title="Manupulating Images and all their Properties">
8
<link rel="prev" href="libgimp-image.html" title="Manupulating Images and all their Properties">
9
<link rel="next" href="libgimp-gimpcolor.html" title="gimpcolor">
10
<meta name="generator" content="GTK-Doc V1.4 (XML mode)">
11
<link rel="stylesheet" href="style.css" type="text/css">
12
<link rel="part" href="gimpdefinitions.html" title="Part I. GIMP Constants">
13
<link rel="part" href="libgimp.html" title="Part II. GIMP Library">
14
<link rel="chapter" href="libgimp-general.html" title="Functions not Related to Specific Images">
15
<link rel="chapter" href="libgimp-image.html" title="Manupulating Images and all their Properties">
16
<link rel="chapter" href="libgimp-data.html" title="Data Objects">
17
<link rel="chapter" href="libgimp-selectors.html" title="Controlling the Core's Selection Dialogs">
18
<link rel="part" href="libgimpui.html" title="Part III. GIMP User Interface Library">
19
<link rel="chapter" href="libgimpui-hierarchy.html" title="Object Hierarchy">
21
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
22
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
23
<td><a accesskey="p" href="libgimp-image.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
24
<td><a accesskey="u" href="libgimp-image.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
25
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
26
<th width="100%" align="center">GIMP Library Reference Manual</th>
27
<td><a accesskey="n" href="libgimp-gimpcolor.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
29
<div class="refentry" lang="en">
30
<a name="libgimp-gimpchannel"></a><div class="titlepage"></div>
31
<div class="refnamediv"><table width="100%"><tr>
33
<h2><span class="refentrytitle">gimpchannel</span></h2>
34
<p>gimpchannel — Functions for manipulating channels.</p>
36
<td valign="top" align="right"></td>
38
<div class="refsynopsisdiv">
40
<pre class="synopsis">
44
gint32 <a href="libgimp-gimpchannel.html#gimp-channel-new">gimp_channel_new</a> (gint32 image_ID,
50
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
52
gint32 <a href="libgimp-gimpchannel.html#gimp-channel-copy">gimp_channel_copy</a> (gint32 channel_ID);
53
gboolean <a href="libgimp-gimpchannel.html#gimp-channel-get-show-masked">gimp_channel_get_show_masked</a> (gint32 channel_ID);
54
gboolean <a href="libgimp-gimpchannel.html#gimp-channel-set-show-masked">gimp_channel_set_show_masked</a> (gint32 channel_ID,
55
gboolean show_masked);
56
gdouble <a href="libgimp-gimpchannel.html#gimp-channel-get-opacity">gimp_channel_get_opacity</a> (gint32 channel_ID);
57
gboolean <a href="libgimp-gimpchannel.html#gimp-channel-set-opacity">gimp_channel_set_opacity</a> (gint32 channel_ID,
59
gboolean <a href="libgimp-gimpchannel.html#gimp-channel-get-color">gimp_channel_get_color</a> (gint32 channel_ID,
61
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
63
gboolean <a href="libgimp-gimpchannel.html#gimp-channel-set-color">gimp_channel_set_color</a> (gint32 channel_ID,
65
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
67
gboolean <a href="libgimp-gimpchannel.html#gimp-channel-combine-masks">gimp_channel_combine_masks</a> (gint32 channel1_ID,
69
<a href="libgimp-gimpenums.html#GimpChannelOps">GimpChannelOps</a> operation,
74
<div class="refsect1" lang="en">
75
<a name="id2567303"></a><h2>Description</h2>
77
Functions for manipulating channels.
80
<div class="refsect1" lang="en">
81
<a name="id2567314"></a><h2>Details</h2>
82
<div class="refsect2" lang="en">
83
<a name="id2567320"></a><h3>
84
<a name="gimp-channel-new"></a>gimp_channel_new ()</h3>
85
<a class="indexterm" name="id2567331"></a><pre class="programlisting">gint32 gimp_channel_new (gint32 image_ID,
91
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
92
>GimpRGB</a> *color);</pre>
97
This procedure creates a new channel with the specified width and
98
height. Name, opacity, and color are also supplied parameters. The
99
new channel still needs to be added to the image, as this is not
100
automatic. Add the new channel with the 'gimp_image_add_channel'
101
command. Other attributes such as channel show masked, should be set
102
with explicit procedure calls. The channel's contents are undefined
107
<div class="variablelist"><table border="0">
108
<col align="left" valign="top">
112
<span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
113
<td> The image to which to add the channel.
118
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
119
<td> The channel name.
124
<span class="term"><em class="parameter"><code>width</code></em> :</span></td>
125
<td> The channel width.
130
<span class="term"><em class="parameter"><code>height</code></em> :</span></td>
131
<td> The channel height.
136
<span class="term"><em class="parameter"><code>opacity</code></em> :</span></td>
137
<td> The channel opacity.
142
<span class="term"><em class="parameter"><code>color</code></em> :</span></td>
143
<td> The channel compositing color.
148
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
149
<td> The newly created channel.
156
<div class="refsect2" lang="en">
157
<a name="id2537965"></a><h3>
158
<a name="gimp-channel-copy"></a>gimp_channel_copy ()</h3>
159
<a class="indexterm" name="id2537975"></a><pre class="programlisting">gint32 gimp_channel_copy (gint32 channel_ID);</pre>
164
This procedure copies the specified channel and returns the copy.</p>
168
<div class="variablelist"><table border="0">
169
<col align="left" valign="top">
173
<span class="term"><em class="parameter"><code>channel_ID</code></em> :</span></td>
174
<td> The channel to copy.
179
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
180
<td> The newly copied channel.
187
<div class="refsect2" lang="en">
188
<a name="id2538038"></a><h3>
189
<a name="gimp-channel-get-show-masked"></a>gimp_channel_get_show_masked ()</h3>
190
<a class="indexterm" name="id2538047"></a><pre class="programlisting">gboolean gimp_channel_get_show_masked (gint32 channel_ID);</pre>
192
Get the composite method of the specified channel.
195
This procedure returns the specified channel's composite method. If
196
it is non-zero, then the channel is composited with the image so
197
that masked regions are shown. Otherwise, selected regions are
202
<div class="variablelist"><table border="0">
203
<col align="left" valign="top">
207
<span class="term"><em class="parameter"><code>channel_ID</code></em> :</span></td>
213
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
214
<td> The channel composite method.
221
<div class="refsect2" lang="en">
222
<a name="id2567905"></a><h3>
223
<a name="gimp-channel-set-show-masked"></a>gimp_channel_set_show_masked ()</h3>
224
<a class="indexterm" name="id2567916"></a><pre class="programlisting">gboolean gimp_channel_set_show_masked (gint32 channel_ID,
225
gboolean show_masked);</pre>
227
Set the composite method of the specified channel.
230
This procedure sets the specified channel's composite method. If it
231
is non-zero, then the channel is composited with the image so that
232
masked regions are shown. Otherwise, selected regions are shown.</p>
236
<div class="variablelist"><table border="0">
237
<col align="left" valign="top">
241
<span class="term"><em class="parameter"><code>channel_ID</code></em> :</span></td>
247
<span class="term"><em class="parameter"><code>show_masked</code></em> :</span></td>
248
<td> The new channel composite method.
253
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
254
<td> TRUE on success.
261
<div class="refsect2" lang="en">
262
<a name="id2568006"></a><h3>
263
<a name="gimp-channel-get-opacity"></a>gimp_channel_get_opacity ()</h3>
264
<a class="indexterm" name="id2568015"></a><pre class="programlisting">gdouble gimp_channel_get_opacity (gint32 channel_ID);</pre>
266
Get the opacity of the specified channel.
269
This procedure returns the specified channel's opacity.</p>
273
<div class="variablelist"><table border="0">
274
<col align="left" valign="top">
278
<span class="term"><em class="parameter"><code>channel_ID</code></em> :</span></td>
284
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
285
<td> The channel opacity.
292
<div class="refsect2" lang="en">
293
<a name="id2568080"></a><h3>
294
<a name="gimp-channel-set-opacity"></a>gimp_channel_set_opacity ()</h3>
295
<a class="indexterm" name="id2568089"></a><pre class="programlisting">gboolean gimp_channel_set_opacity (gint32 channel_ID,
296
gdouble opacity);</pre>
298
Set the opacity of the specified channel.
301
This procedure sets the specified channel's opacity.</p>
305
<div class="variablelist"><table border="0">
306
<col align="left" valign="top">
310
<span class="term"><em class="parameter"><code>channel_ID</code></em> :</span></td>
316
<span class="term"><em class="parameter"><code>opacity</code></em> :</span></td>
317
<td> The new channel opacity.
322
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
323
<td> TRUE on success.
330
<div class="refsect2" lang="en">
331
<a name="id2570632"></a><h3>
332
<a name="gimp-channel-get-color"></a>gimp_channel_get_color ()</h3>
333
<a class="indexterm" name="id2570640"></a><pre class="programlisting">gboolean gimp_channel_get_color (gint32 channel_ID,
335
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
336
>GimpRGB</a> *color);</pre>
338
Get the compositing color of the specified channel.
341
This procedure returns the specified channel's compositing color.</p>
345
<div class="variablelist"><table border="0">
346
<col align="left" valign="top">
350
<span class="term"><em class="parameter"><code>channel_ID</code></em> :</span></td>
356
<span class="term"><em class="parameter"><code>color</code></em> :</span></td>
357
<td> The channel compositing color.
362
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
363
<td> TRUE on success.
370
<div class="refsect2" lang="en">
371
<a name="id2538103"></a><h3>
372
<a name="gimp-channel-set-color"></a>gimp_channel_set_color ()</h3>
373
<a class="indexterm" name="id2543018"></a><pre class="programlisting">gboolean gimp_channel_set_color (gint32 channel_ID,
375
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
376
>GimpRGB</a> *color);</pre>
378
Set the compositing color of the specified channel.
381
This procedure sets the specified channel's compositing color.</p>
385
<div class="variablelist"><table border="0">
386
<col align="left" valign="top">
390
<span class="term"><em class="parameter"><code>channel_ID</code></em> :</span></td>
396
<span class="term"><em class="parameter"><code>color</code></em> :</span></td>
397
<td> The new channel compositing color.
402
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
403
<td> TRUE on success.
410
<div class="refsect2" lang="en">
411
<a name="id2570782"></a><h3>
412
<a name="gimp-channel-combine-masks"></a>gimp_channel_combine_masks ()</h3>
413
<a class="indexterm" name="id2570791"></a><pre class="programlisting">gboolean gimp_channel_combine_masks (gint32 channel1_ID,
415
<a href="libgimp-gimpenums.html#GimpChannelOps">GimpChannelOps</a> operation,
419
Combine two channel masks.
422
This procedure combines two channel masks. The result is stored in
423
the first channel.</p>
427
<div class="variablelist"><table border="0">
428
<col align="left" valign="top">
432
<span class="term"><em class="parameter"><code>channel1_ID</code></em> :</span></td>
438
<span class="term"><em class="parameter"><code>channel2_ID</code></em> :</span></td>
444
<span class="term"><em class="parameter"><code>operation</code></em> :</span></td>
445
<td> The selection operation.
450
<span class="term"><em class="parameter"><code>offx</code></em> :</span></td>
451
<td> x offset between upper left corner of channels: (second - first).
456
<span class="term"><em class="parameter"><code>offy</code></em> :</span></td>
457
<td> y offset between upper left corner of channels: (second - first).
462
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
463
<td> TRUE on success.
471
<table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle">
472
<td align="left"><a accesskey="p" href="libgimp-image.html"><b><< Manupulating Images and all their Properties</b></a></td>
473
<td align="right"><a accesskey="n" href="libgimp-gimpcolor.html"><b>gimpcolor >></b></a></td>