4
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
5
<title>gimppixbuf</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
7
7
<link rel="start" href="index.html" title="GIMP Library Reference Manual">
8
<link rel="up" href="libgimpui.html" title="Part III. GIMP User Interface Library">
9
<link rel="prev" href="libgimp-gimpimagecombobox.html" title="gimpimagecombobox">
8
<link rel="up" href="libgimpui.html" title="Part II. GIMP User Interface Library">
9
<link rel="prev" href="GimpImageComboBox.html" title="gimpimagecombobox">
10
10
<link rel="next" href="GimpProgressBar.html" title="GimpProgressBar">
11
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="part" href="gimpdefinitions.html" title="Part I. GIMP Constants">
14
<link rel="part" href="libgimp.html" title="Part II. GIMP Library">
13
<link rel="part" href="libgimp.html" title="Part I. GIMP Library">
15
14
<link rel="chapter" href="libgimp-general.html" title="Functions not Related to Specific Images">
16
<link rel="chapter" href="libgimp-image.html" title="Manupulating Images and all their Properties">
15
<link rel="chapter" href="libgimp-image.html" title="Manupulating Images and their Properties">
17
16
<link rel="chapter" href="libgimp-data.html" title="Data Objects">
18
17
<link rel="chapter" href="libgimp-selectors.html" title="Controlling the Core's Selection Dialogs">
19
<link rel="part" href="libgimpui.html" title="Part III. GIMP User Interface Library">
18
<link rel="part" href="libgimpui.html" title="Part II. GIMP User Interface Library">
20
19
<link rel="chapter" href="libgimpui-hierarchy.html" title="Object Hierarchy">
20
<link rel="index" href="libgimp-index.html" title="Index">
21
<link rel="index" href="libgimp-index-new-in-2-2.html" title="Index of new symbols in GIMP 2.2">
22
<link rel="index" href="libgimp-index-new-in-2-4.html" title="Index of new symbols in GIMP 2.4">
23
<link rel="index" href="libgimp-index-deprecated.html" title="Index of deprecated symbols">
22
25
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
23
26
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
24
27
<tr valign="middle">
25
<td><a accesskey="p" href="libgimp-gimpimagecombobox.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
28
<td><a accesskey="p" href="GimpImageComboBox.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
26
29
<td><a accesskey="u" href="libgimpui.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
27
30
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
28
31
<th width="100%" align="center">GIMP Library Reference Manual</th>
29
32
<td><a accesskey="n" href="GimpProgressBar.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
31
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2527388" class="shortcut">Top</a>
34
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2564199" class="shortcut">Top</a>
33
<a href="#id2653914" class="shortcut">Description</a></nobr></td></tr>
36
<a href="#id2715692" class="shortcut">Description</a></nobr></td></tr>
35
38
<div class="refentry" lang="en">
36
39
<a name="libgimp-gimppixbuf"></a><div class="titlepage"></div>
37
40
<div class="refnamediv"><table width="100%"><tr>
40
<a name="id2527388"></a><span class="refentrytitle">gimppixbuf</span>
43
<a name="id2564199"></a><span class="refentrytitle">gimppixbuf</span>
42
45
<p>gimppixbuf — Get a thumbnail pixbuf for a drawable or image.</p>
52
enum <a href="libgimp-gimppixbuf.html#GimpPixbufTransparency">GimpPixbufTransparency</a>;
53
GdkPixbuf* <a href="libgimp-gimppixbuf.html#gimp-image-get-thumbnail">gimp_image_get_thumbnail</a> (gint32 image_ID,
56
<a href="libgimp-gimppixbuf.html#GimpPixbufTransparency">GimpPixbufTransparency</a> alpha);
57
GdkPixbuf* <a href="libgimp-gimppixbuf.html#gimp-drawable-get-thumbnail">gimp_drawable_get_thumbnail</a> (gint32 drawable_ID,
60
<a href="libgimp-gimppixbuf.html#GimpPixbufTransparency">GimpPixbufTransparency</a> alpha);
61
GdkPixbuf* <a href="libgimp-gimppixbuf.html#gimp-drawable-get-sub-thumbnail">gimp_drawable_get_sub_thumbnail</a> (gint32 drawable_ID,
68
<a href="libgimp-gimppixbuf.html#GimpPixbufTransparency">GimpPixbufTransparency</a> alpha);
55
enum <a href="libgimp-gimppixbuf.html#GimpPixbufTransparency">GimpPixbufTransparency</a>;
56
GdkPixbuf* <a href="libgimp-gimppixbuf.html#gimp-image-get-thumbnail">gimp_image_get_thumbnail</a> (gint32 image_ID,
59
<a href="libgimp-gimppixbuf.html#GimpPixbufTransparency">GimpPixbufTransparency</a> alpha);
60
GdkPixbuf* <a href="libgimp-gimppixbuf.html#gimp-drawable-get-thumbnail">gimp_drawable_get_thumbnail</a> (gint32 drawable_ID,
63
<a href="libgimp-gimppixbuf.html#GimpPixbufTransparency">GimpPixbufTransparency</a> alpha);
64
GdkPixbuf* <a href="libgimp-gimppixbuf.html#gimp-drawable-get-sub-thumbnail">gimp_drawable_get_sub_thumbnail</a> (gint32 drawable_ID,
71
<a href="libgimp-gimppixbuf.html#GimpPixbufTransparency">GimpPixbufTransparency</a> alpha);
72
gint32 <a href="libgimp-gimppixbuf.html#gimp-layer-new-from-pixbuf">gimp_layer_new_from_pixbuf</a> (gint32 image_ID,
76
<a href="libgimp-gimpenums.html#GimpLayerModeEffects">GimpLayerModeEffects</a> mode,
77
gdouble progress_start,
78
gdouble progress_end);
71
81
<div class="refsect1" lang="en">
72
<a name="id2653914"></a><h2>Description</h2>
82
<a name="id2715692"></a><h2>Description</h2>
74
84
Get a thumbnail pixbuf for a drawable or image.
77
87
<div class="refsect1" lang="en">
78
<a name="id2653931"></a><h2>Details</h2>
88
<a name="id2713532"></a><h2>Details</h2>
79
89
<div class="refsect2" lang="en">
80
<a name="id2653941"></a><h3>
90
<a name="id2713542"></a><h3>
81
91
<a name="GimpPixbufTransparency"></a>enum GimpPixbufTransparency</h3>
82
<a class="indexterm" name="id2653952"></a><pre class="programlisting">typedef enum
92
<a class="indexterm" name="id2713553"></a><pre class="programlisting">typedef enum
84
94
GIMP_PIXBUF_KEEP_ALPHA,
85
95
GIMP_PIXBUF_SMALL_CHECKS,
94
104
<div class="refsect2" lang="en">
95
<a name="id2655781"></a><h3>
105
<a name="id2713570"></a><h3>
96
106
<a name="gimp-image-get-thumbnail"></a>gimp_image_get_thumbnail ()</h3>
97
<a class="indexterm" name="id2655794"></a><pre class="programlisting">GdkPixbuf* gimp_image_get_thumbnail (gint32 image_ID,
100
<a href="libgimp-gimppixbuf.html#GimpPixbufTransparency">GimpPixbufTransparency</a> alpha);</pre>
107
<a class="indexterm" name="id2713583"></a><pre class="programlisting">GdkPixbuf* gimp_image_get_thumbnail (gint32 image_ID,
110
<a href="libgimp-gimppixbuf.html#GimpPixbufTransparency">GimpPixbufTransparency</a> alpha);</pre>
102
112
Retrieves a thumbnail pixbuf for the image identified by <em class="parameter"><code>image_ID</code></em>.
103
113
The thumbnail will be not larger than the requested size.</p>
108
118
<col align="left" valign="top">
112
<span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
121
<td><span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
113
122
<td> the image ID
118
<span class="term"><em class="parameter"><code>width</code></em> :</span></td>
119
<td> the requested thumbnail width (<= 512 pixels)
124
<span class="term"><em class="parameter"><code>height</code></em> :</span></td>
125
<td> the requested thumbnail height (<= 512 pixels)
130
<span class="term"><em class="parameter"><code>alpha</code></em> :</span></td>
126
<td><span class="term"><em class="parameter"><code>width</code></em> :</span></td>
127
<td> the requested thumbnail width (<= 1024 pixels)
131
<td><span class="term"><em class="parameter"><code>height</code></em> :</span></td>
132
<td> the requested thumbnail height (<= 1024 pixels)
136
<td><span class="term"><em class="parameter"><code>alpha</code></em> :</span></td>
131
137
<td> how to handle an alpha channel
136
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
141
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
137
142
<td> a new <span class="type">GdkPixbuf</span>
148
<p class="since">Since GIMP 2.2
147
152
<div class="refsect2" lang="en">
148
<a name="id2655936"></a><h3>
153
<a name="id2718855"></a><h3>
149
154
<a name="gimp-drawable-get-thumbnail"></a>gimp_drawable_get_thumbnail ()</h3>
150
<a class="indexterm" name="id2655949"></a><pre class="programlisting">GdkPixbuf* gimp_drawable_get_thumbnail (gint32 drawable_ID,
153
<a href="libgimp-gimppixbuf.html#GimpPixbufTransparency">GimpPixbufTransparency</a> alpha);</pre>
155
<a class="indexterm" name="id2718868"></a><pre class="programlisting">GdkPixbuf* gimp_drawable_get_thumbnail (gint32 drawable_ID,
158
<a href="libgimp-gimppixbuf.html#GimpPixbufTransparency">GimpPixbufTransparency</a> alpha);</pre>
155
160
Retrieves a thumbnail pixbuf for the drawable identified by
156
161
<em class="parameter"><code>drawable_ID</code></em>. The thumbnail will be not larger than the requested
162
167
<col align="left" valign="top">
166
<span class="term"><em class="parameter"><code>drawable_ID</code></em> :</span></td>
170
<td><span class="term"><em class="parameter"><code>drawable_ID</code></em> :</span></td>
167
171
<td> the drawable ID
172
<span class="term"><em class="parameter"><code>width</code></em> :</span></td>
173
<td> the requested thumbnail width (<= 512 pixels)
178
<span class="term"><em class="parameter"><code>height</code></em> :</span></td>
179
<td> the requested thumbnail height (<= 512 pixels)
184
<span class="term"><em class="parameter"><code>alpha</code></em> :</span></td>
175
<td><span class="term"><em class="parameter"><code>width</code></em> :</span></td>
176
<td> the requested thumbnail width (<= 1024 pixels)
180
<td><span class="term"><em class="parameter"><code>height</code></em> :</span></td>
181
<td> the requested thumbnail height (<= 1024 pixels)
185
<td><span class="term"><em class="parameter"><code>alpha</code></em> :</span></td>
185
186
<td> how to handle an alpha channel
190
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
190
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
191
191
<td> a new <span class="type">GdkPixbuf</span>
197
<p class="since">Since GIMP 2.2
201
201
<div class="refsect2" lang="en">
202
<a name="id2655111"></a><h3>
202
<a name="id2719014"></a><h3>
203
203
<a name="gimp-drawable-get-sub-thumbnail"></a>gimp_drawable_get_sub_thumbnail ()</h3>
204
<a class="indexterm" name="id2655124"></a><pre class="programlisting">GdkPixbuf* gimp_drawable_get_sub_thumbnail (gint32 drawable_ID,
211
<a href="libgimp-gimppixbuf.html#GimpPixbufTransparency">GimpPixbufTransparency</a> alpha);</pre>
204
<a class="indexterm" name="id2719027"></a><pre class="programlisting">GdkPixbuf* gimp_drawable_get_sub_thumbnail (gint32 drawable_ID,
211
<a href="libgimp-gimppixbuf.html#GimpPixbufTransparency">GimpPixbufTransparency</a> alpha);</pre>
213
213
Retrieves a thumbnail pixbuf for the drawable identified by
214
214
<em class="parameter"><code>drawable_ID</code></em>. The thumbnail will be not larger than the requested
220
220
<col align="left" valign="top">
224
<span class="term"><em class="parameter"><code>drawable_ID</code></em> :</span></td>
223
<td><span class="term"><em class="parameter"><code>drawable_ID</code></em> :</span></td>
225
224
<td> the drawable ID
230
<span class="term"><em class="parameter"><code>src_x</code></em> :</span></td>
228
<td><span class="term"><em class="parameter"><code>src_x</code></em> :</span></td>
231
229
<td> the x coordinate of the area
236
<span class="term"><em class="parameter"><code>src_y</code></em> :</span></td>
233
<td><span class="term"><em class="parameter"><code>src_y</code></em> :</span></td>
237
234
<td> the y coordinate of the area
242
<span class="term"><em class="parameter"><code>src_width</code></em> :</span></td>
238
<td><span class="term"><em class="parameter"><code>src_width</code></em> :</span></td>
243
239
<td> the width of the area
248
<span class="term"><em class="parameter"><code>src_height</code></em> :</span></td>
243
<td><span class="term"><em class="parameter"><code>src_height</code></em> :</span></td>
249
244
<td> the height of the area
254
<span class="term"><em class="parameter"><code>dest_width</code></em> :</span></td>
255
<td> the requested thumbnail width (<= 512 pixels)
260
<span class="term"><em class="parameter"><code>dest_height</code></em> :</span></td>
261
<td> the requested thumbnail height (<= 512 pixels)
266
<span class="term"><em class="parameter"><code>alpha</code></em> :</span></td>
248
<td><span class="term"><em class="parameter"><code>dest_width</code></em> :</span></td>
249
<td> the requested thumbnail width (<= 1024 pixels)
253
<td><span class="term"><em class="parameter"><code>dest_height</code></em> :</span></td>
254
<td> the requested thumbnail height (<= 1024 pixels)
258
<td><span class="term"><em class="parameter"><code>alpha</code></em> :</span></td>
267
259
<td> how to handle an alpha channel
272
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
263
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
273
264
<td> a new <span class="type">GdkPixbuf</span>
270
<p class="since">Since GIMP 2.2
274
<div class="refsect2" lang="en">
275
<a name="id2715906"></a><h3>
276
<a name="gimp-layer-new-from-pixbuf"></a>gimp_layer_new_from_pixbuf ()</h3>
277
<a class="indexterm" name="id2715920"></a><pre class="programlisting">gint32 gimp_layer_new_from_pixbuf (gint32 image_ID,
281
<a href="libgimp-gimpenums.html#GimpLayerModeEffects">GimpLayerModeEffects</a> mode,
282
gdouble progress_start,
283
gdouble progress_end);</pre>
285
Create a new layer from a <code class="literal">GdkPixbuf</code>.
288
This procedure creates a new layer from the given <code class="literal">GdkPixbuf</code>. The
289
image has to be an RGB image and just like with <a href="libgimp-gimplayer.html#gimp-layer-new"><code class="function">gimp_layer_new()</code></a>
290
you will still need to add the layer to it.
293
If you pass <em class="parameter"><code>progress_end</code></em> > <em class="parameter"><code>progress_start</code></em> to this function,
294
@<a href="libgimp-gimpprogress.html#gimp-progress-update"><code class="function">gimp_progress_update()</code></a> will be called for. You have to call
295
@<a href="libgimp-gimpprogress.html#gimp-progress-init"><code class="function">gimp_progress_init()</code></a> beforehand.</p>
299
<div class="variablelist"><table border="0">
300
<col align="left" valign="top">
303
<td><span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
304
<td> The RGB image to which to add the layer.
308
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
313
<td><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></td>
318
<td><span class="term"><em class="parameter"><code>opacity</code></em> :</span></td>
319
<td> The layer opacity.
323
<td><span class="term"><em class="parameter"><code>mode</code></em> :</span></td>
324
<td> The layer combination mode.
328
<td><span class="term"><em class="parameter"><code>progress_start</code></em> :</span></td>
329
<td> start of progress
333
<td><span class="term"><em class="parameter"><code>progress_end</code></em> :</span></td>
338
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
339
<td> The newly created layer.
345
<p class="since">Since GIMP 2.4