KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/share/gtk-doc/html/gdk/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/gtk-doc/html/gdk/gdk-Images.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Images</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GDK Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk-GdkRGB.html" title="GdkRGB">
<link rel="next" href="gdk-Pixbufs.html" title="Pixbufs">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="reference" href="reference.html" title="API Reference">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk-GdkRGB.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GDK Reference Manual</th>
<td><a accesskey="n" href="gdk-Pixbufs.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2976046" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2976408" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gdk-Images"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2976046"></a><span class="refentrytitle">Images</span>
</h2>
<p>Images &#8212; A client-side area for bit-mapped graphics</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;gdk/gdk.h&gt;


            <a href="gdk-Images.html#GdkImage">GdkImage</a>;
<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,
                                             <a href="gdk-Visuals.html#GdkVisual">GdkVisual</a> *visual,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height);
enum        <a href="gdk-Images.html#GdkImageType">GdkImageType</a>;
<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,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height);
<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,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> x,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> y,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height);
<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);
void        <a href="gdk-Images.html#gdk-image-unref">gdk_image_unref</a>                 (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image);
#define     <a href="gdk-Images.html#gdk-image-destroy">gdk_image_destroy</a>
<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);
void        <a href="gdk-Images.html#gdk-image-set-colormap">gdk_image_set_colormap</a>          (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
                                             <a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *colormap);

void        <a href="gdk-Images.html#gdk-image-put-pixel">gdk_image_put_pixel</a>             (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> x,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> y,
                                             <a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> pixel);
<a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a>     <a href="gdk-Images.html#gdk-image-get-pixel">gdk_image_get_pixel</a>             (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> x,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> y);


</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2976408"></a><h2>Description</h2>
<p>
The <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> type represents an area for drawing graphics.
It has now been superceded to a large extent by the much more flexible
<a href="gdk-GdkRGB.html" title="GdkRGB">GdkRGB</a> functions.
</p>
<p>
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>.
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>.
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>.
</p>
<p>
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
<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.
Though manipulating the pixel data requires complicated code to cope with
the different formats that may be used.
</p>
<p>
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>.
</p>
<p>
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>.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2976589"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2976599"></a><h3>
<a name="GdkImage"></a>GdkImage</h3>
<a class="indexterm" name="id2976612"></a><pre class="programlisting">typedef struct {
  GObject parent_instance;

  
  GdkImageType	type; /* read only. */
  GdkVisual    *visual;	    /* read only. visual used to create the image */
  GdkByteOrder	byte_order; /* read only. */
  gint		width; /* read only. */
  gint		height; /* read only. */
  guint16	depth; /* read only. */
  guint16	bpp;	        /* read only. bytes per pixel */
  guint16	bpl;	        /* read only. bytes per line */
  guint16       bits_per_pixel; /* read only. bits per pixel */
  gpointer	mem;

  GdkColormap  *colormap; /* read only. */
} GdkImage;
</pre>
<p>
The <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> struct contains information on the image and the pixel data.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>&#160;<em class="structfield"><code>parent_instance</code></em>;</span></td>
<td>the parent instance
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Images.html#GdkImageType">GdkImageType</a>&#160;<em class="structfield"><code>type</code></em>;</span></td>
<td>the type of the image.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Visuals.html#GdkVisual">GdkVisual</a>&#160;*<em class="structfield"><code>visual</code></em>;</span></td>
<td>the visual.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Visuals.html#GdkByteOrder">GdkByteOrder</a>&#160;<em class="structfield"><code>byte_order</code></em>;</span></td>
<td>the byte order.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>&#160;<em class="structfield"><code>width</code></em>;</span></td>
<td>the width of the image in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>&#160;<em class="structfield"><code>height</code></em>;</span></td>
<td>the height of the image in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a>&#160;<em class="structfield"><code>depth</code></em>;</span></td>
<td>the depth of the image, i.e. the number of bits per pixel.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a>&#160;<em class="structfield"><code>bpp</code></em>;</span></td>
<td>the number of bytes per pixel.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a>&#160;<em class="structfield"><code>bpl</code></em>;</span></td>
<td>the number of bytes per line of the image.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a>&#160;<em class="structfield"><code>bits_per_pixel</code></em>;</span></td>
<td>the number of bits per pixel.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>&#160;<em class="structfield"><code>mem</code></em>;</span></td>
<td>the pixel data.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a>&#160;*<em class="structfield"><code>colormap</code></em>;</span></td>
<td>the <a href="gdk-Colormaps-and-Colors.html#GdkColormap"><span class="type">GdkColormap</span></a> associated with the image

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2976908"></a><h3>
<a name="gdk-image-new"></a>gdk_image_new ()</h3>
<a class="indexterm" name="id2976921"></a><pre class="programlisting"><a href="gdk-Images.html#GdkImage">GdkImage</a>*   gdk_image_new                   (<a href="gdk-Images.html#GdkImageType">GdkImageType</a> type,
                                             <a href="gdk-Visuals.html#GdkVisual">GdkVisual</a> *visual,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height);</pre>
<p>
Creates a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
<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>
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
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
then use <a href="gdk-Images.html#GDK-IMAGE-NORMAL:CAPS"><code class="literal">GDK_IMAGE_NORMAL</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>visual</code></em>&#160;:</span></td>
<td>the <a href="gdk-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> to use for the image.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
<td>the width of the image in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
<td>the height of the image in pixels.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the image could not be created.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977156"></a><h3>
<a name="GdkImageType"></a>enum GdkImageType</h3>
<a class="indexterm" name="id2977168"></a><pre class="programlisting">typedef enum
{
  GDK_IMAGE_NORMAL,
  GDK_IMAGE_SHARED,
  GDK_IMAGE_FASTEST
} GdkImageType;
</pre>
<p>
Specifies the type of a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GDK-IMAGE-NORMAL:CAPS"></a><code class="literal">GDK_IMAGE_NORMAL</code></span></td>
<td>The original X image type, which is quite slow since the
image has to be transferred from the client to the server to display it.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-IMAGE-SHARED:CAPS"></a><code class="literal">GDK_IMAGE_SHARED</code></span></td>
<td>A faster image type, which uses shared memory to transfer
the image data between client and server. However this will only be available
if client and server are on the same machine and the shared memory extension
is supported by the server.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-IMAGE-FASTEST:CAPS"></a><code class="literal">GDK_IMAGE_FASTEST</code></span></td>
<td>Specifies that <a href="gdk-Images.html#GDK-IMAGE-SHARED:CAPS"><code class="literal">GDK_IMAGE_SHARED</code></a> should be tried first,
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.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977292"></a><h3>
<a name="gdk-image-new-bitmap"></a>gdk_image_new_bitmap ()</h3>
<a class="indexterm" name="id2977307"></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,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_image_new_bitmap</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Creates a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> with a depth of 1 from the given data.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p>THIS FUNCTION IS INCREDIBLY BROKEN. The passed-in data must 
be allocated by <code class="function">malloc()</code> (NOT <a
href="../glib/glib-Memory-Allocation.html#g-malloc"
><code class="function">g_malloc()</code></a>) and will be freed when the 
image is freed.</p>
</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>visual</code></em>&#160;:</span></td>
<td> the <a href="gdk-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> to use for the image.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
<td> the pixel data. 
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
<td> the width of the image in pixels. 
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
<td> the height of the image in pixels. 
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977499"></a><h3>
<a name="gdk-image-get"></a>gdk_image_get ()</h3>
<a class="indexterm" name="id2977514"></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,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> x,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> y,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_image_get</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
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>;
<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
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
choice.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td> a <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
<td> x coordinate in <em class="parameter"><code>window</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
<td> y coordinate in <em class="parameter"><code>window</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
<td> width of area in <em class="parameter"><code>window</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
<td> height of area in <em class="parameter"><code>window</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977755"></a><h3>
<a name="gdk-image-ref"></a>gdk_image_ref ()</h3>
<a class="indexterm" name="id2977771"></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>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_image_ref</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Deprecated function; use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref"
><code class="function">g_object_ref()</code></a> instead.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the image
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977862"></a><h3>
<a name="gdk-image-unref"></a>gdk_image_unref ()</h3>
<a class="indexterm" name="id2977877"></a><pre class="programlisting">void        gdk_image_unref                 (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_image_unref</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Deprecated function; use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a> instead.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977957"></a><h3>
<a name="gdk-image-destroy"></a>gdk_image_destroy</h3>
<a class="indexterm" name="id2977972"></a><pre class="programlisting">#define gdk_image_destroy              gdk_image_unref
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_image_destroy</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Destroys a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>, freeing any resources allocated for it.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2978010"></a><h3>
<a name="gdk-image-get-colormap"></a>gdk_image_get_colormap ()</h3>
<a class="indexterm" name="id2978023"></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>
<p>
Retrieves the colormap for a given image, if it exists.  An image
will have a colormap if the drawable from which it was created has
a colormap, or if a colormap was set explicitely with
<a href="gdk-Images.html#gdk-image-set-colormap"><code class="function">gdk_image_set_colormap()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> colormap for the image
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2978105"></a><h3>
<a name="gdk-image-set-colormap"></a>gdk_image_set_colormap ()</h3>
<a class="indexterm" name="id2978118"></a><pre class="programlisting">void        gdk_image_set_colormap          (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
                                             <a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *colormap);</pre>
<p>
Sets the colormap for the image to the given colormap.  Normally
there's no need to use this function, images are created with the
correct colormap if you get the image from a drawable. If you
create the image from scratch, use the colormap of the drawable you
intend to render the image to.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>colormap</code></em>&#160;:</span></td>
<td> a <a href="gdk-Colormaps-and-Colors.html#GdkColormap"><span class="type">GdkColormap</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2978209"></a><h3>
<a name="gdk-image-put-pixel"></a>gdk_image_put_pixel ()</h3>
<a class="indexterm" name="id2978222"></a><pre class="programlisting">void        gdk_image_put_pixel             (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> x,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> y,
                                             <a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a> pixel);</pre>
<p>
Sets a pixel in a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> to a given pixel value.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td>a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
<td>the x coordinate of the pixel to set.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
<td>the y coordinate of the pixel to set.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>pixel</code></em>&#160;:</span></td>
<td>the pixel value to set.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2978349"></a><h3>
<a name="gdk-image-get-pixel"></a>gdk_image_get_pixel ()</h3>
<a class="indexterm" name="id2978362"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#guint32"
>guint32</a>     gdk_image_get_pixel             (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> x,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> y);</pre>
<p>
Gets a pixel value at a specified position in a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td>a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
<td>the x coordinate of the pixel to get.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
<td>the y coordinate of the pixel to get.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>the pixel value at the given position.


</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2978479"></a><h2>See Also</h2>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="gdk-Bitmaps-and-Pixmaps.html" title="Bitmaps and Pixmaps">Bitmaps and Pixmaps</a></span></td>
<td><p>
Graphics which are stored on the X Windows server.
Since these are stored on the server they can be drawn very quickly, and all
of the <a href="gdk-Drawing-Primitives.html" title="Drawing Primitives">Drawing Primitives</a> can be
used to draw on them. Their main disadvantage is that manipulating individual
pixels can be very slow.
</p></td>
</tr>
<tr>
<td>
<span class="term"><a href="gdk-GdkRGB.html" title="GdkRGB">GdkRGB</a></span></td>
<td><p>
Built on top of <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>, this provides much more functionality,
including the dithering of colors to produce better output on low-color
displays.
</p></td>
</tr>
</tbody>
</table></div>
<p>
</p>
</div>
</div>
</body>
</html>

Anon7 - 2021