41
41
#include <gdk-pixbuf/gdk-pixbuf.h>
43
43
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new" title="gdk_pixbuf_new ()">gdk_pixbuf_new</a> (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkColorspace" title="enum GdkColorspace"><span class="type">GdkColorspace</span></a> colorspace</code></em>,
44
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> has_alpha</code></em>,
44
<em class="parameter"><code><span class="type">gboolean</span> has_alpha</code></em>,
45
45
<em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
46
46
<em class="parameter"><code><span class="type">int</span> width</code></em>,
47
47
<em class="parameter"><code><span class="type">int</span> height</code></em>);
48
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data" title="gdk_pixbuf_new_from_data ()">gdk_pixbuf_new_from_data</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *data</code></em>,
48
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data" title="gdk_pixbuf_new_from_data ()">gdk_pixbuf_new_from_data</a> (<em class="parameter"><code>const <span class="type">guchar</span> *data</code></em>,
49
49
<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkColorspace" title="enum GdkColorspace"><span class="type">GdkColorspace</span></a> colorspace</code></em>,
50
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> has_alpha</code></em>,
50
<em class="parameter"><code><span class="type">gboolean</span> has_alpha</code></em>,
51
51
<em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
52
52
<em class="parameter"><code><span class="type">int</span> width</code></em>,
53
53
<em class="parameter"><code><span class="type">int</span> height</code></em>,
54
54
<em class="parameter"><code><span class="type">int</span> rowstride</code></em>,
55
55
<em class="parameter"><code><a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#GdkPixbufDestroyNotify" title="GdkPixbufDestroyNotify ()"><span class="type">GdkPixbufDestroyNotify</span></a> destroy_fn</code></em>,
56
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> destroy_fn_data</code></em>);
56
<em class="parameter"><code><span class="type">gpointer</span> destroy_fn_data</code></em>);
57
57
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-xpm-data" title="gdk_pixbuf_new_from_xpm_data ()">gdk_pixbuf_new_from_xpm_data</a> (<em class="parameter"><code>const <span class="type">char</span> **data</code></em>);
58
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-inline" title="gdk_pixbuf_new_from_inline ()">gdk_pixbuf_new_from_inline</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> data_length</code></em>,
59
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *data</code></em>,
60
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> copy_pixels</code></em>,
61
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
58
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-inline" title="gdk_pixbuf_new_from_inline ()">gdk_pixbuf_new_from_inline</a> (<em class="parameter"><code><span class="type">gint</span> data_length</code></em>,
59
<em class="parameter"><code>const <span class="type">guint8</span> *data</code></em>,
60
<em class="parameter"><code><span class="type">gboolean</span> copy_pixels</code></em>,
61
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
62
62
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-subpixbuf" title="gdk_pixbuf_new_subpixbuf ()">gdk_pixbuf_new_subpixbuf</a> (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src_pixbuf</code></em>,
63
63
<em class="parameter"><code><span class="type">int</span> src_x</code></em>,
64
64
<em class="parameter"><code><span class="type">int</span> src_y</code></em>,
104
104
<div class="refsect2">
105
105
<a name="gdk-pixbuf-new"></a><h3>gdk_pixbuf_new ()</h3>
106
106
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkColorspace" title="enum GdkColorspace"><span class="type">GdkColorspace</span></a> colorspace</code></em>,
107
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> has_alpha</code></em>,
107
<em class="parameter"><code><span class="type">gboolean</span> has_alpha</code></em>,
108
108
<em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
109
109
<em class="parameter"><code><span class="type">int</span> width</code></em>,
110
110
<em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
148
148
<div class="refsect2">
149
149
<a name="gdk-pixbuf-new-from-data"></a><h3>gdk_pixbuf_new_from_data ()</h3>
150
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_data (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *data</code></em>,
150
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_data (<em class="parameter"><code>const <span class="type">guchar</span> *data</code></em>,
151
151
<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkColorspace" title="enum GdkColorspace"><span class="type">GdkColorspace</span></a> colorspace</code></em>,
152
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> has_alpha</code></em>,
152
<em class="parameter"><code><span class="type">gboolean</span> has_alpha</code></em>,
153
153
<em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
154
154
<em class="parameter"><code><span class="type">int</span> width</code></em>,
155
155
<em class="parameter"><code><span class="type">int</span> height</code></em>,
156
156
<em class="parameter"><code><span class="type">int</span> rowstride</code></em>,
157
157
<em class="parameter"><code><a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#GdkPixbufDestroyNotify" title="GdkPixbufDestroyNotify ()"><span class="type">GdkPixbufDestroyNotify</span></a> destroy_fn</code></em>,
158
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> destroy_fn_data</code></em>);</pre>
158
<em class="parameter"><code><span class="type">gpointer</span> destroy_fn_data</code></em>);</pre>
160
160
Creates a new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> out of in-memory image data. Currently only RGB
161
161
images with 8 bits per sample are supported.
237
237
<div class="refsect2">
238
238
<a name="gdk-pixbuf-new-from-inline"></a><h3>gdk_pixbuf_new_from_inline ()</h3>
239
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_inline (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> data_length</code></em>,
240
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *data</code></em>,
241
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> copy_pixels</code></em>,
242
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
239
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_inline (<em class="parameter"><code><span class="type">gint</span> data_length</code></em>,
240
<em class="parameter"><code>const <span class="type">guint8</span> *data</code></em>,
241
<em class="parameter"><code><span class="type">gboolean</span> copy_pixels</code></em>,
242
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
244
244
Create a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> from a flat representation that is suitable for
245
245
storing as inline data in a program. This is useful if you want to
271
271
For the typical case where the inline pixbuf is read-only static data,
272
272
you don't need to copy the pixel data unless you intend to write to
273
it, so you can pass <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for <em class="parameter"><code>copy_pixels</code></em>. (If you pass
273
it, so you can pass <code class="literal">FALSE</code> for <em class="parameter"><code>copy_pixels</code></em>. (If you pass
274
274
<code class="option">--rle</code> to <span class="command"><strong>gdk-pixbuf-csource</strong></span>, a copy
275
will be made even if <em class="parameter"><code>copy_pixels</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, so using this option is
275
will be made even if <em class="parameter"><code>copy_pixels</code></em> is <code class="literal">FALSE</code>, so using this option is
276
276
generally a bad idea.)
319
319
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
321
<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> return location, may be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore errors</td>
321
<span class="type">GError</span> return location, may be <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> to ignore errors</td>
324
324
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
325
325
<td>A newly-created <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> structure with a reference,
326
count of 1, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error occurred.</td>
326
count of 1, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if an error occurred.</td>