1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
7
<link rel="start" href="index.html" title="GDK Reference Manual">
8
<link rel="up" href="reference.html" title="API Reference">
9
<link rel="prev" href="gdk-GdkRGB.html" title="GdkRGB">
10
<link rel="next" href="gdk-Pixbufs.html" title="Pixbufs">
11
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="reference" href="reference.html" title="API Reference">
14
<link rel="index" href="ix01.html" title="Index">
15
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
16
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
17
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
18
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
19
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
20
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
22
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
23
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
25
<td><a accesskey="p" href="gdk-GdkRGB.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
26
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
27
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
28
<th width="100%" align="center">GDK Reference Manual</th>
29
<td><a accesskey="n" href="gdk-Pixbufs.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="#id2649109" class="shortcut">Top</a>
33
<a href="#id2649478" class="shortcut">Description</a></nobr></td></tr>
35
<div class="refentry" lang="en">
36
<a name="gdk-Images"></a><div class="titlepage"></div>
37
<div class="refnamediv"><table width="100%"><tr>
40
<a name="id2649109"></a><span class="refentrytitle">Images</span>
42
<p>Images — A client-side area for bit-mapped graphics</p>
44
<td valign="top" align="right"></td>
46
<div class="refsynopsisdiv">
48
<pre class="synopsis">
50
#include <gdk/gdk.h>
53
<a href="gdk-Images.html#GdkImage">GdkImage</a>;
54
<a href="gdk-Images.html#GdkImage">GdkImage</a>* <a href="gdk-Images.html#gdk-image-new">gdk_image_new</a> (<a href="gdk-Images.html#GdkImageType">GdkImageType</a> type,
55
<a href="gdk-Visuals.html#GdkVisual">GdkVisual</a> *visual,
58
enum <a href="gdk-Images.html#GdkImageType">GdkImageType</a>;
59
<a href="gdk-Images.html#GdkImage">GdkImage</a>* <a href="gdk-Images.html#gdk-image-new-bitmap">gdk_image_new_bitmap</a> (<a href="gdk-Visuals.html#GdkVisual">GdkVisual</a> *visual,
63
<a href="gdk-Images.html#GdkImage">GdkImage</a>* <a href="gdk-Images.html#gdk-image-get">gdk_image_get</a> (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
68
<a href="gdk-Images.html#GdkImage">GdkImage</a>* <a href="gdk-Images.html#gdk-image-ref">gdk_image_ref</a> (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image);
69
void <a href="gdk-Images.html#gdk-image-unref">gdk_image_unref</a> (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image);
70
#define <a href="gdk-Images.html#gdk-image-destroy">gdk_image_destroy</a>
71
<a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a>* <a href="gdk-Images.html#gdk-image-get-colormap">gdk_image_get_colormap</a> (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image);
72
void <a href="gdk-Images.html#gdk-image-set-colormap">gdk_image_set_colormap</a> (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
73
<a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *colormap);
75
void <a href="gdk-Images.html#gdk-image-put-pixel">gdk_image_put_pixel</a> (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
79
guint32 <a href="gdk-Images.html#gdk-image-get-pixel">gdk_image_get_pixel</a> (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
86
<div class="refsect1" lang="en">
87
<a name="id2649478"></a><h2>Description</h2>
89
The <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> type represents an area for drawing graphics.
90
It has now been superceded to a large extent by the much more flexible
91
<a href="gdk-GdkRGB.html" title="GdkRGB">GdkRGB</a> functions.
94
To create an empty <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> use <a href="gdk-Images.html#gdk-image-new"><code class="function">gdk_image_new()</code></a>.
95
To create a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> from bitmap data use <a href="gdk-Images.html#gdk-image-new-bitmap"><code class="function">gdk_image_new_bitmap()</code></a>.
96
To create an image from part of a <a href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> use <a href="gdk-Drawing-Primitives.html#gdk-drawable-get-image"><code class="function">gdk_drawable_get_image()</code></a>.
99
The image can be manipulated with <a href="gdk-Images.html#gdk-image-get-pixel"><code class="function">gdk_image_get_pixel()</code></a> and
100
<a href="gdk-Images.html#gdk-image-put-pixel"><code class="function">gdk_image_put_pixel()</code></a>, or alternatively by changing the actual pixel data.
101
Though manipulating the pixel data requires complicated code to cope with
102
the different formats that may be used.
105
To draw a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> in a <a href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> or <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> use <a href="gdk-Drawing-Primitives.html#gdk-draw-image"><code class="function">gdk_draw_image()</code></a>.
108
To destroy a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> use <a href="gdk-Images.html#gdk-image-destroy"><code class="function">gdk_image_destroy()</code></a>.
111
<div class="refsect1" lang="en">
112
<a name="id2649658"></a><h2>Details</h2>
113
<div class="refsect2" lang="en">
114
<a name="id2649669"></a><h3>
115
<a name="GdkImage"></a>GdkImage</h3>
116
<a class="indexterm" name="id2649681"></a><pre class="programlisting">typedef struct {
117
GObject parent_instance;
120
GdkImageType type; /* read only. */
121
GdkVisual *visual; /* read only. visual used to create the image */
122
GdkByteOrder byte_order; /* read only. */
123
gint width; /* read only. */
124
gint height; /* read only. */
125
guint16 depth; /* read only. */
126
guint16 bpp; /* read only. bytes per pixel */
127
guint16 bpl; /* read only. bytes per line */
128
guint16 bits_per_pixel; /* read only. bits per pixel */
131
GdkColormap *colormap; /* read only. */
135
The <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> struct contains information on the image and the pixel data.
137
<div class="variablelist"><table border="0">
138
<col align="left" valign="top">
141
<td><span class="term">GObject <em class="structfield"><code>parent_instance</code></em>;</span></td>
142
<td>the parent instance
146
<td><span class="term"><a href="gdk-Images.html#GdkImageType">GdkImageType</a> <em class="structfield"><code>type</code></em>;</span></td>
147
<td>the type of the image.
151
<td><span class="term"><a href="gdk-Visuals.html#GdkVisual">GdkVisual</a> *<em class="structfield"><code>visual</code></em>;</span></td>
156
<td><span class="term"><a href="gdk-Visuals.html#GdkByteOrder">GdkByteOrder</a> <em class="structfield"><code>byte_order</code></em>;</span></td>
161
<td><span class="term">gint <em class="structfield"><code>width</code></em>;</span></td>
162
<td>the width of the image in pixels.
166
<td><span class="term">gint <em class="structfield"><code>height</code></em>;</span></td>
167
<td>the height of the image in pixels.
171
<td><span class="term">guint16 <em class="structfield"><code>depth</code></em>;</span></td>
172
<td>the depth of the image, i.e. the number of bits per pixel.
176
<td><span class="term">guint16 <em class="structfield"><code>bpp</code></em>;</span></td>
177
<td>the number of bytes per pixel.
181
<td><span class="term">guint16 <em class="structfield"><code>bpl</code></em>;</span></td>
182
<td>the number of bytes per line of the image.
186
<td><span class="term">guint16 <em class="structfield"><code>bits_per_pixel</code></em>;</span></td>
187
<td>the number of bits per pixel.
191
<td><span class="term">gpointer <em class="structfield"><code>mem</code></em>;</span></td>
196
<td><span class="term"><a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *<em class="structfield"><code>colormap</code></em>;</span></td>
197
<td>the <a href="gdk-Colormaps-and-Colors.html#GdkColormap"><span class="type">GdkColormap</span></a> associated with the image
205
<div class="refsect2" lang="en">
206
<a name="id2649978"></a><h3>
207
<a name="gdk-image-new"></a>gdk_image_new ()</h3>
208
<a class="indexterm" name="id2649990"></a><pre class="programlisting"><a href="gdk-Images.html#GdkImage">GdkImage</a>* gdk_image_new (<a href="gdk-Images.html#GdkImageType">GdkImageType</a> type,
209
<a href="gdk-Visuals.html#GdkVisual">GdkVisual</a> *visual,
213
Creates a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
215
<div class="variablelist"><table border="0">
216
<col align="left" valign="top">
219
<td><span class="term"><em class="parameter"><code>type</code></em> :</span></td>
220
<td>the type of the <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>, one of <a href="gdk-Images.html#GDK-IMAGE-NORMAL:CAPS"><code class="literal">GDK_IMAGE_NORMAL</code></a>, <a href="gdk-Images.html#GDK-IMAGE-SHARED:CAPS"><code class="literal">GDK_IMAGE_SHARED</code></a>
221
and <a href="gdk-Images.html#GDK-IMAGE-FASTEST:CAPS"><code class="literal">GDK_IMAGE_FASTEST</code></a>. <a href="gdk-Images.html#GDK-IMAGE-FASTEST:CAPS"><code class="literal">GDK_IMAGE_FASTEST</code></a> is probably the best choice, since
222
it will try creating a <a href="gdk-Images.html#GDK-IMAGE-SHARED:CAPS"><code class="literal">GDK_IMAGE_SHARED</code></a> image first and if that fails it will
223
then use <a href="gdk-Images.html#GDK-IMAGE-NORMAL:CAPS"><code class="literal">GDK_IMAGE_NORMAL</code></a>.
227
<td><span class="term"><em class="parameter"><code>visual</code></em> :</span></td>
228
<td>the <a href="gdk-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> to use for the image.
232
<td><span class="term"><em class="parameter"><code>width</code></em> :</span></td>
233
<td>the width of the image in pixels.
237
<td><span class="term"><em class="parameter"><code>height</code></em> :</span></td>
238
<td>the height of the image in pixels.
242
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
243
<td>a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>, or <a
244
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
245
><code class="literal">NULL</code></a> if the image could not be created.
254
<div class="refsect2" lang="en">
255
<a name="id2650226"></a><h3>
256
<a name="GdkImageType"></a>enum GdkImageType</h3>
257
<a class="indexterm" name="id2650238"></a><pre class="programlisting">typedef enum
265
Specifies the type of a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
267
<div class="variablelist"><table border="0">
268
<col align="left" valign="top">
271
<td><span class="term"><a name="GDK-IMAGE-NORMAL:CAPS"></a><code class="literal">GDK_IMAGE_NORMAL</code></span></td>
272
<td>The original X image type, which is quite slow since the
273
image has to be transferred from the client to the server to display it.
277
<td><span class="term"><a name="GDK-IMAGE-SHARED:CAPS"></a><code class="literal">GDK_IMAGE_SHARED</code></span></td>
278
<td>A faster image type, which uses shared memory to transfer
279
the image data between client and server. However this will only be available
280
if client and server are on the same machine and the shared memory extension
281
is supported by the server.
285
<td><span class="term"><a name="GDK-IMAGE-FASTEST:CAPS"></a><code class="literal">GDK_IMAGE_FASTEST</code></span></td>
286
<td>Specifies that <a href="gdk-Images.html#GDK-IMAGE-SHARED:CAPS"><code class="literal">GDK_IMAGE_SHARED</code></a> should be tried first,
287
and if that fails then <a href="gdk-Images.html#GDK-IMAGE-NORMAL:CAPS"><code class="literal">GDK_IMAGE_NORMAL</code></a> will be used.
295
<div class="refsect2" lang="en">
296
<a name="id2650362"></a><h3>
297
<a name="gdk-image-new-bitmap"></a>gdk_image_new_bitmap ()</h3>
298
<a class="indexterm" name="id2650377"></a><pre class="programlisting"><a href="gdk-Images.html#GdkImage">GdkImage</a>* gdk_image_new_bitmap (<a href="gdk-Visuals.html#GdkVisual">GdkVisual</a> *visual,
302
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
303
<h3 class="title">Warning</h3>
304
<p><code class="literal">gdk_image_new_bitmap</code> is deprecated and should not be used in newly-written code.</p>
307
Creates a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> with a depth of 1 from the given data.
309
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
310
<h3 class="title">Warning</h3>
311
<p>THIS FUNCTION IS INCREDIBLY BROKEN. The passed-in data must
312
be allocated by <code class="function">malloc()</code> (NOT <code class="function">g_malloc()</code>) and will be freed when the
317
<div class="variablelist"><table border="0">
318
<col align="left" valign="top">
321
<td><span class="term"><em class="parameter"><code>visual</code></em> :</span></td>
322
<td> the <a href="gdk-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> to use for the image.
326
<td><span class="term"><em class="parameter"><code>data</code></em> :</span></td>
331
<td><span class="term"><em class="parameter"><code>width</code></em> :</span></td>
332
<td> the width of the image in pixels.
336
<td><span class="term"><em class="parameter"><code>height</code></em> :</span></td>
337
<td> the height of the image in pixels.
341
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
342
<td> a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
349
<div class="refsect2" lang="en">
350
<a name="id2650569"></a><h3>
351
<a name="gdk-image-get"></a>gdk_image_get ()</h3>
352
<a class="indexterm" name="id2650585"></a><pre class="programlisting"><a href="gdk-Images.html#GdkImage">GdkImage</a>* gdk_image_get (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
357
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
358
<h3 class="title">Warning</h3>
359
<p><code class="literal">gdk_image_get</code> is deprecated and should not be used in newly-written code.</p>
362
This is a deprecated wrapper for <a href="gdk-Drawing-Primitives.html#gdk-drawable-get-image"><code class="function">gdk_drawable_get_image()</code></a>;
363
<a href="gdk-Drawing-Primitives.html#gdk-drawable-get-image"><code class="function">gdk_drawable_get_image()</code></a> should be used instead. Or even better: in
364
most cases <a href="gdk-Pixbufs.html#gdk-pixbuf-get-from-drawable"><code class="function">gdk_pixbuf_get_from_drawable()</code></a> is the most convenient
368
<div class="variablelist"><table border="0">
369
<col align="left" valign="top">
372
<td><span class="term"><em class="parameter"><code>drawable</code></em> :</span></td>
373
<td> a <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>
377
<td><span class="term"><em class="parameter"><code>x</code></em> :</span></td>
378
<td> x coordinate in <em class="parameter"><code>window</code></em>
382
<td><span class="term"><em class="parameter"><code>y</code></em> :</span></td>
383
<td> y coordinate in <em class="parameter"><code>window</code></em>
387
<td><span class="term"><em class="parameter"><code>width</code></em> :</span></td>
388
<td> width of area in <em class="parameter"><code>window</code></em>
392
<td><span class="term"><em class="parameter"><code>height</code></em> :</span></td>
393
<td> height of area in <em class="parameter"><code>window</code></em>
397
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
398
<td> a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> or <a
399
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
400
><code class="literal">NULL</code></a>
407
<div class="refsect2" lang="en">
408
<a name="id2650827"></a><h3>
409
<a name="gdk-image-ref"></a>gdk_image_ref ()</h3>
410
<a class="indexterm" name="id2650842"></a><pre class="programlisting"><a href="gdk-Images.html#GdkImage">GdkImage</a>* gdk_image_ref (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image);</pre>
411
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
412
<h3 class="title">Warning</h3>
413
<p><code class="literal">gdk_image_ref</code> is deprecated and should not be used in newly-written code.</p>
416
Deprecated function; use <code class="function">g_object_ref()</code> instead.</p>
420
<div class="variablelist"><table border="0">
421
<col align="left" valign="top">
424
<td><span class="term"><em class="parameter"><code>image</code></em> :</span></td>
425
<td> a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>
429
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
437
<div class="refsect2" lang="en">
438
<a name="id2650933"></a><h3>
439
<a name="gdk-image-unref"></a>gdk_image_unref ()</h3>
440
<a class="indexterm" name="id2650949"></a><pre class="programlisting">void gdk_image_unref (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image);</pre>
441
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
442
<h3 class="title">Warning</h3>
443
<p><code class="literal">gdk_image_unref</code> is deprecated and should not be used in newly-written code.</p>
446
Deprecated function; use <code class="function">g_object_unref()</code> instead.</p>
450
<div class="variablelist"><table border="0">
451
<col align="left" valign="top">
453
<td><span class="term"><em class="parameter"><code>image</code></em> :</span></td>
454
<td> a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>
460
<div class="refsect2" lang="en">
461
<a name="id2651029"></a><h3>
462
<a name="gdk-image-destroy"></a>gdk_image_destroy</h3>
463
<a class="indexterm" name="id2651045"></a><pre class="programlisting">#define gdk_image_destroy gdk_image_unref
465
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
466
<h3 class="title">Warning</h3>
467
<p><code class="literal">gdk_image_destroy</code> is deprecated and should not be used in newly-written code.</p>
470
Destroys a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>, freeing any resources allocated for it.
474
<div class="refsect2" lang="en">
475
<a name="id2651082"></a><h3>
476
<a name="gdk-image-get-colormap"></a>gdk_image_get_colormap ()</h3>
477
<a class="indexterm" name="id2651095"></a><pre class="programlisting"><a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a>* gdk_image_get_colormap (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image);</pre>
479
Retrieves the colormap for a given image, if it exists. An image
480
will have a colormap if the drawable from which it was created has
481
a colormap, or if a colormap was set explicitely with
482
<a href="gdk-Images.html#gdk-image-set-colormap"><code class="function">gdk_image_set_colormap()</code></a>.</p>
486
<div class="variablelist"><table border="0">
487
<col align="left" valign="top">
490
<td><span class="term"><em class="parameter"><code>image</code></em> :</span></td>
491
<td> a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>
495
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
496
<td> colormap for the image
503
<div class="refsect2" lang="en">
504
<a name="id2651177"></a><h3>
505
<a name="gdk-image-set-colormap"></a>gdk_image_set_colormap ()</h3>
506
<a class="indexterm" name="id2651190"></a><pre class="programlisting">void gdk_image_set_colormap (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
507
<a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *colormap);</pre>
509
Sets the colormap for the image to the given colormap. Normally
510
there's no need to use this function, images are created with the
511
correct colormap if you get the image from a drawable. If you
512
create the image from scratch, use the colormap of the drawable you
513
intend to render the image to.</p>
517
<div class="variablelist"><table border="0">
518
<col align="left" valign="top">
521
<td><span class="term"><em class="parameter"><code>image</code></em> :</span></td>
522
<td> a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>
526
<td><span class="term"><em class="parameter"><code>colormap</code></em> :</span></td>
527
<td> a <a href="gdk-Colormaps-and-Colors.html#GdkColormap"><span class="type">GdkColormap</span></a>
534
<div class="refsect2" lang="en">
535
<a name="id2651282"></a><h3>
536
<a name="gdk-image-put-pixel"></a>gdk_image_put_pixel ()</h3>
537
<a class="indexterm" name="id2651295"></a><pre class="programlisting">void gdk_image_put_pixel (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
540
guint32 pixel);</pre>
542
Sets a pixel in a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> to a given pixel value.
544
<div class="variablelist"><table border="0">
545
<col align="left" valign="top">
548
<td><span class="term"><em class="parameter"><code>image</code></em> :</span></td>
549
<td>a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
553
<td><span class="term"><em class="parameter"><code>x</code></em> :</span></td>
554
<td>the x coordinate of the pixel to set.
558
<td><span class="term"><em class="parameter"><code>y</code></em> :</span></td>
559
<td>the y coordinate of the pixel to set.
563
<td><span class="term"><em class="parameter"><code>pixel</code></em> :</span></td>
564
<td>the pixel value to set.
573
<div class="refsect2" lang="en">
574
<a name="id2651422"></a><h3>
575
<a name="gdk-image-get-pixel"></a>gdk_image_get_pixel ()</h3>
576
<a class="indexterm" name="id2651436"></a><pre class="programlisting">guint32 gdk_image_get_pixel (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
580
Gets a pixel value at a specified position in a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
582
<div class="variablelist"><table border="0">
583
<col align="left" valign="top">
586
<td><span class="term"><em class="parameter"><code>image</code></em> :</span></td>
587
<td>a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
591
<td><span class="term"><em class="parameter"><code>x</code></em> :</span></td>
592
<td>the x coordinate of the pixel to get.
596
<td><span class="term"><em class="parameter"><code>y</code></em> :</span></td>
597
<td>the y coordinate of the pixel to get.
601
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
602
<td>the pixel value at the given position.
611
<div class="refsect1" lang="en">
612
<a name="id2651554"></a><h2>See Also</h2>
615
<div class="variablelist"><table border="0">
616
<col align="left" valign="top">
619
<td><span class="term"><a href="gdk-Bitmaps-and-Pixmaps.html" title="Bitmaps and Pixmaps">Bitmaps and Pixmaps</a></span></td>
621
Graphics which are stored on the X Windows server.
622
Since these are stored on the server they can be drawn very quickly, and all
623
of the <a href="gdk-Drawing-Primitives.html" title="Drawing Primitives">Drawing Primitives</a> can be
624
used to draw on them. Their main disadvantage is that manipulating individual
625
pixels can be very slow.
629
<td><span class="term"><a href="gdk-GdkRGB.html" title="GdkRGB">GdkRGB</a></span></td>
631
Built on top of <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>, this provides much more functionality,
632
including the dithering of colors to produce better output on low-color