PATH:
usr
/
share
/
gtk-doc
/
html
/
gdk-pixbuf
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Inline data: GDK-PixBuf Reference Manual</title> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> <link rel="home" href="index.html" title="GDK-PixBuf Reference Manual"> <link rel="up" href="rn01.html" title="API Reference"> <link rel="prev" href="gdk-pixbuf-Image-Data-in-Memory.html" title="Image Data in Memory"> <link rel="next" href="gdk-pixbuf-Scaling.html" title="Scaling"> <meta name="generator" content="GTK-Doc V1.27 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </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="5"><tr valign="middle"> <td width="100%" align="left" class="shortcuts"> <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> <a href="#gdk-pixbuf-Inline-data.description" class="shortcut">Description</a></span> </td> <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> <td><a accesskey="u" href="rn01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> <td><a accesskey="p" href="gdk-pixbuf-Image-Data-in-Memory.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> <td><a accesskey="n" href="gdk-pixbuf-Scaling.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> </tr></table> <div class="refentry"> <a name="gdk-pixbuf-Inline-data"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle"><a name="gdk-pixbuf-Inline-data.top_of_page"></a>Inline data</span></h2> <p>Inline data — Functions for inlined pixbuf handling.</p> </td> <td class="gallery_image" valign="top" align="right"></td> </tr></table></div> <div class="refsect1"> <a name="gdk-pixbuf-Inline-data.functions"></a><h2>Functions</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="functions_return"> <col class="functions_name"> </colgroup> <tbody> <tr> <td class="function_type"> <span class="returnvalue">gpointer</span> </td> <td class="function_name"> <a class="link" href="gdk-pixbuf-Inline-data.html#gdk-pixdata-from-pixbuf" title="gdk_pixdata_from_pixbuf ()">gdk_pixdata_from_pixbuf</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * </td> <td class="function_name"> <a class="link" href="gdk-pixbuf-Inline-data.html#gdk-pixbuf-from-pixdata" title="gdk_pixbuf_from_pixdata ()">gdk_pixbuf_from_pixdata</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">guint8</span> * </td> <td class="function_name"> <a class="link" href="gdk-pixbuf-Inline-data.html#gdk-pixdata-serialize" title="gdk_pixdata_serialize ()">gdk_pixdata_serialize</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="gdk-pixbuf-Inline-data.html#gdk-pixdata-deserialize" title="gdk_pixdata_deserialize ()">gdk_pixdata_deserialize</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">GString</span> * </td> <td class="function_name"> <a class="link" href="gdk-pixbuf-Inline-data.html#gdk-pixdata-to-csource" title="gdk_pixdata_to_csource ()">gdk_pixdata_to_csource</a> <span class="c_punctuation">()</span> </td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="gdk-pixbuf-Inline-data.other"></a><h2>Types and Values</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="name"> <col class="description"> </colgroup> <tbody> <tr> <td class="datatype_keyword">struct</td> <td class="function_name"><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata">GdkPixdata</a></td> </tr> <tr> <td class="datatype_keyword">enum</td> <td class="function_name"><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdataType" title="enum GdkPixdataType">GdkPixdataType</a></td> </tr> <tr> <td class="datatype_keyword">enum</td> <td class="function_name"><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdataDumpType" title="enum GdkPixdataDumpType">GdkPixdataDumpType</a></td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="gdk-pixbuf-Inline-data.html#GDK-PIXBUF-MAGIC-NUMBER:CAPS" title="GDK_PIXBUF_MAGIC_NUMBER">GDK_PIXBUF_MAGIC_NUMBER</a></td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="gdk-pixbuf-Inline-data.html#GDK-PIXDATA-HEADER-LENGTH:CAPS" title="GDK_PIXDATA_HEADER_LENGTH">GDK_PIXDATA_HEADER_LENGTH</a></td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="gdk-pixbuf-Inline-data.includes"></a><h2>Includes</h2> <pre class="synopsis">#include <gdk-pixbuf/gdk-pixdata.h> </pre> </div> <div class="refsect1"> <a name="gdk-pixbuf-Inline-data.description"></a><h2>Description</h2> <p>Using <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a>, images can be compiled into an application, making it unnecessary to refer to external image files at runtime. GdkPixBuf includes a utility named gdk-pixbuf-csource, which can be used to convert image files into <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structures suitable for inclusion in C sources. To convert the <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structures back into <a href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf-struct"><span class="type">GdkPixbufs</span></a>, use gdk_pixbuf_from_pixdata.</p> <p><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> should not be used any more. <span class="type">GResource</span> should be used to save the original compressed images inside the program's binary.</p> </div> <div class="refsect1"> <a name="gdk-pixbuf-Inline-data.functions_details"></a><h2>Functions</h2> <div class="refsect2"> <a name="gdk-pixdata-from-pixbuf"></a><h3>gdk_pixdata_from_pixbuf ()</h3> <pre class="programlisting"><span class="returnvalue">gpointer</span> gdk_pixdata_from_pixbuf (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>, <em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>, <em class="parameter"><code><span class="type">gboolean</span> use_rle</code></em>);</pre> <div class="warning"> <p><code class="literal">gdk_pixdata_from_pixbuf</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p> <p>Use <span class="type">GResource</span> instead.</p> </div> <p>Converts a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> to a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a>. If <em class="parameter"><code>use_rle</code></em> is <code class="literal">TRUE</code>, the pixel data is run-length encoded into newly-allocated memory and a pointer to that memory is returned.</p> <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> <div class="refsect3"> <a name="gdk-pixdata-from-pixbuf.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>pixdata</p></td> <td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> to fill.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pixbuf</p></td> <td class="parameter_description"><p>the data to fill <em class="parameter"><code>pixdata</code></em> with.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>use_rle</p></td> <td class="parameter_description"><p>whether to use run-length encoding for the pixel data.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="gdk-pixdata-from-pixbuf.returns"></a><h4>Returns</h4> <p>If <em class="parameter"><code>use_rle</code></em> is <code class="literal">TRUE</code>, a pointer to the newly-allocated memory for the run-length encoded pixel data, otherwise <code class="literal">NULL</code>. </p> <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p> </div> </div> <hr> <div class="refsect2"> <a name="gdk-pixbuf-from-pixdata"></a><h3>gdk_pixbuf_from_pixdata ()</h3> <pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_from_pixdata (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>, <em class="parameter"><code><span class="type">gboolean</span> copy_pixels</code></em>, <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> <div class="warning"> <p><code class="literal">gdk_pixbuf_from_pixdata</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p> <p>Use <span class="type">GResource</span> instead.</p> </div> <p>Converts a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> to a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>. If <em class="parameter"><code>copy_pixels</code></em> is <code class="literal">TRUE</code> or if the pixel data is run-length-encoded, the pixel data is copied into newly-allocated memory; otherwise it is reused.</p> <div class="refsect3"> <a name="gdk-pixbuf-from-pixdata.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>pixdata</p></td> <td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> to convert into a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>copy_pixels</p></td> <td class="parameter_description"><p>whether to copy raw pixel data; run-length encoded pixel data is always copied.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>error</p></td> <td class="parameter_description"><p>location to store possible errors.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="gdk-pixbuf-from-pixdata.returns"></a><h4>Returns</h4> <p>a new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>. </p> <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> <div class="refsect2"> <a name="gdk-pixdata-serialize"></a><h3>gdk_pixdata_serialize ()</h3> <pre class="programlisting"><span class="returnvalue">guint8</span> * gdk_pixdata_serialize (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>, <em class="parameter"><code><span class="type">guint</span> *stream_length_p</code></em>);</pre> <div class="warning"> <p><code class="literal">gdk_pixdata_serialize</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p> <p>Use <span class="type">GResource</span> instead.</p> </div> <p>Serializes a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure into a byte stream. The byte stream consists of a straightforward writeout of the <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> fields in network byte order, plus the <em class="parameter"><code>pixel_data</code></em> bytes the structure points to.</p> <div class="refsect3"> <a name="gdk-pixdata-serialize.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>pixdata</p></td> <td class="parameter_description"><p>a valid <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure to serialize.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>stream_length_p</p></td> <td class="parameter_description"><p>location to store the resulting stream length in.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="gdk-pixdata-serialize.returns"></a><h4>Returns</h4> <p>A newly-allocated string containing the serialized <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure. </p> <p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=stream_length_p][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> </div> </div> <hr> <div class="refsect2"> <a name="gdk-pixdata-deserialize"></a><h3>gdk_pixdata_deserialize ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> gdk_pixdata_deserialize (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>, <em class="parameter"><code><span class="type">guint</span> stream_length</code></em>, <em class="parameter"><code>const <span class="type">guint8</span> *stream</code></em>, <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> <div class="warning"> <p><code class="literal">gdk_pixdata_deserialize</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p> <p>Use <span class="type">GResource</span> instead.</p> </div> <p>Deserializes (reconstruct) a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure from a byte stream. The byte stream consists of a straightforward writeout of the <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> fields in network byte order, plus the <em class="parameter"><code>pixel_data</code></em> bytes the structure points to. The <em class="parameter"><code>pixdata</code></em> contents are reconstructed byte by byte and are checked for validity. This function may fail with <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR-CORRUPT-IMAGE:CAPS"><code class="literal">GDK_PIXBUF_ERROR_CORRUPT_IMAGE</code></a> or <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR-UNKNOWN-TYPE:CAPS"><code class="literal">GDK_PIXBUF_ERROR_UNKNOWN_TYPE</code></a>.</p> <div class="refsect3"> <a name="gdk-pixdata-deserialize.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>pixdata</p></td> <td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure to be filled in.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>stream_length</p></td> <td class="parameter_description"><p>length of the stream used for deserialization.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>stream</p></td> <td class="parameter_description"><p>stream of bytes containing a serialized <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=stream_length]</span></td> </tr> <tr> <td class="parameter_name"><p>error</p></td> <td class="parameter_description"><p><span class="type">GError</span> location to indicate failures (maybe <code class="literal">NULL</code> to ignore errors).</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="gdk-pixdata-deserialize.returns"></a><h4>Returns</h4> <p> Upon successful deserialization <code class="literal">TRUE</code> is returned, <code class="literal">FALSE</code> otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="gdk-pixdata-to-csource"></a><h3>gdk_pixdata_to_csource ()</h3> <pre class="programlisting"><span class="returnvalue">GString</span> * gdk_pixdata_to_csource (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>, <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>, <em class="parameter"><code><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdataDumpType" title="enum GdkPixdataDumpType"><span class="type">GdkPixdataDumpType</span></a> dump_type</code></em>);</pre> <div class="warning"> <p><code class="literal">gdk_pixdata_to_csource</code> has been deprecated since version 2.32 and should not be used in newly-written code.</p> <p>Use <span class="type">GResource</span> instead.</p> </div> <p>Generates C source code suitable for compiling images directly into programs. </p> <p>gdk-pixbuf ships with a program called <a class="link" href="gdk-pixbuf-csource.html" title="gdk-pixbuf-csource">gdk-pixbuf-csource</a>, which offers a command line interface to this function.</p> <div class="refsect3"> <a name="gdk-pixdata-to-csource.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>pixdata</p></td> <td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> to convert to C source.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>name</p></td> <td class="parameter_description"><p>used for naming generated data structures or macros.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>dump_type</p></td> <td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdataDumpType" title="enum GdkPixdataDumpType"><span class="type">GdkPixdataDumpType</span></a> determining the kind of C source to be generated.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="gdk-pixdata-to-csource.returns"></a><h4>Returns</h4> <p> a newly-allocated string containing the C source form of <em class="parameter"><code>pixdata</code></em> .</p> </div> </div> </div> <div class="refsect1"> <a name="gdk-pixbuf-Inline-data.other_details"></a><h2>Types and Values</h2> <div class="refsect2"> <a name="GdkPixdata"></a><h3>struct GdkPixdata</h3> <pre class="programlisting">struct GdkPixdata { guint32 magic; /* GDK_PIXBUF_MAGIC_NUMBER */ gint32 length; /* <1 to disable length checks, otherwise: * GDK_PIXDATA_HEADER_LENGTH + pixel_data length */ guint32 pixdata_type; /* GdkPixdataType */ guint32 rowstride; guint32 width; guint32 height; guint8 *pixel_data; }; </pre> <div class="warning"><p><code class="literal">GdkPixdata</code> is deprecated and should not be used in newly-written code.</p></div> <p>A <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> contains pixbuf information in a form suitable for serialization and streaming.</p> <div class="refsect3"> <a name="GdkPixdata.members"></a><h4>Members</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="300px" class="struct_members_name"> <col class="struct_members_description"> <col width="200px" class="struct_members_annotations"> </colgroup> <tbody> <tr> <td class="struct_member_name"><p><span class="type">guint32</span> <em class="structfield"><code><a name="GdkPixdata.magic"></a>magic</code></em>;</p></td> <td class="struct_member_description"><p>magic number. A valid <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure must have <a class="link" href="gdk-pixbuf-Inline-data.html#GDK-PIXBUF-MAGIC-NUMBER:CAPS" title="GDK_PIXBUF_MAGIC_NUMBER"><span class="type">GDK_PIXBUF_MAGIC_NUMBER</span></a> here.</p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p><span class="type">gint32</span> <em class="structfield"><code><a name="GdkPixdata.length"></a>length</code></em>;</p></td> <td class="struct_member_description"><p>less than 1 to disable length checks, otherwise <a class="link" href="gdk-pixbuf-Inline-data.html#GDK-PIXDATA-HEADER-LENGTH:CAPS" title="GDK_PIXDATA_HEADER_LENGTH"><span class="type">GDK_PIXDATA_HEADER_LENGTH</span></a> + length of <em class="parameter"><code>pixel_data</code></em> . </p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p><span class="type">guint32</span> <em class="structfield"><code><a name="GdkPixdata.pixdata-type"></a>pixdata_type</code></em>;</p></td> <td class="struct_member_description"><p>information about colorspace, sample width and encoding, in a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdataType" title="enum GdkPixdataType"><span class="type">GdkPixdataType</span></a>. </p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p><span class="type">guint32</span> <em class="structfield"><code><a name="GdkPixdata.rowstride"></a>rowstride</code></em>;</p></td> <td class="struct_member_description"><p>Distance in bytes between rows.</p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p><span class="type">guint32</span> <em class="structfield"><code><a name="GdkPixdata.width"></a>width</code></em>;</p></td> <td class="struct_member_description"><p>Width of the image in pixels.</p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p><span class="type">guint32</span> <em class="structfield"><code><a name="GdkPixdata.height"></a>height</code></em>;</p></td> <td class="struct_member_description"><p>Height of the image in pixels.</p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p><span class="type">guint8</span> *<em class="structfield"><code><a name="GdkPixdata.pixel-data"></a>pixel_data</code></em>;</p></td> <td class="struct_member_description"><p><em class="parameter"><code>width</code></em> x <em class="parameter"><code>height</code></em> pixels, encoded according to <em class="parameter"><code>pixdata_type</code></em> and <em class="parameter"><code>rowstride</code></em> . </p></td> <td class="struct_member_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="GdkPixdataType"></a><h3>enum GdkPixdataType</h3> <div class="warning"><p><code class="literal">GdkPixdataType</code> is deprecated and should not be used in newly-written code.</p></div> <p>An enumeration containing three sets of flags for a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> struct: one for the used colorspace, one for the width of the samples and one for the encoding of the pixel data.</p> <div class="refsect3"> <a name="GdkPixdataType.members"></a><h4>Members</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="300px" class="enum_members_name"> <col class="enum_members_description"> <col width="200px" class="enum_members_annotations"> </colgroup> <tbody> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-COLOR-TYPE-RGB:CAPS"></a>GDK_PIXDATA_COLOR_TYPE_RGB</p></td> <td class="enum_member_description"> <p>each pixel has red, green and blue samples.</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-COLOR-TYPE-RGBA:CAPS"></a>GDK_PIXDATA_COLOR_TYPE_RGBA</p></td> <td class="enum_member_description"> <p>each pixel has red, green and blue samples and an alpha value.</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-COLOR-TYPE-MASK:CAPS"></a>GDK_PIXDATA_COLOR_TYPE_MASK</p></td> <td class="enum_member_description"> <p>mask for the colortype flags of the enum.</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-SAMPLE-WIDTH-8:CAPS"></a>GDK_PIXDATA_SAMPLE_WIDTH_8</p></td> <td class="enum_member_description"> <p>each sample has 8 bits.</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-SAMPLE-WIDTH-MASK:CAPS"></a>GDK_PIXDATA_SAMPLE_WIDTH_MASK</p></td> <td class="enum_member_description"> <p>mask for the sample width flags of the enum.</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-ENCODING-RAW:CAPS"></a>GDK_PIXDATA_ENCODING_RAW</p></td> <td class="enum_member_description"> <p>the pixel data is in raw form. </p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-ENCODING-RLE:CAPS"></a>GDK_PIXDATA_ENCODING_RLE</p></td> <td class="enum_member_description"> <p>the pixel data is run-length encoded. Runs may be up to 127 bytes long; their length is stored in a single byte preceding the pixel data for the run. If a run is constant, its length byte has the high bit set and the pixel data consists of a single pixel which must be repeated. </p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-ENCODING-MASK:CAPS"></a>GDK_PIXDATA_ENCODING_MASK</p></td> <td class="enum_member_description"> <p>mask for the encoding flags of the enum.</p> </td> <td class="enum_member_annotations"> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="GdkPixdataDumpType"></a><h3>enum GdkPixdataDumpType</h3> <div class="warning"><p><code class="literal">GdkPixdataDumpType</code> is deprecated and should not be used in newly-written code.</p></div> <p>An enumeration which is used by <a class="link" href="gdk-pixbuf-Inline-data.html#gdk-pixdata-to-csource" title="gdk_pixdata_to_csource ()"><code class="function">gdk_pixdata_to_csource()</code></a> to determine the form of C source to be generated. The three values <em class="parameter"><code>GDK_PIXDATA_DUMP_PIXDATA_STREAM</code></em> , <em class="parameter"><code>GDK_PIXDATA_DUMP_PIXDATA_STRUCT</code></em> and <em class="parameter"><code>GDK_PIXDATA_DUMP_MACROS</code></em> are mutually exclusive, as are <em class="parameter"><code>GDK_PIXBUF_DUMP_GTYPES</code></em> and <em class="parameter"><code>GDK_PIXBUF_DUMP_CTYPES</code></em> . The remaining elements are optional flags that can be freely added.</p> <div class="refsect3"> <a name="GdkPixdataDumpType.members"></a><h4>Members</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="300px" class="enum_members_name"> <col class="enum_members_description"> <col width="200px" class="enum_members_annotations"> </colgroup> <tbody> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-DUMP-PIXDATA-STREAM:CAPS"></a>GDK_PIXDATA_DUMP_PIXDATA_STREAM</p></td> <td class="enum_member_description"> <p>Generate pixbuf data stream (a single string containing a serialized <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure in network byte order).</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-DUMP-PIXDATA-STRUCT:CAPS"></a>GDK_PIXDATA_DUMP_PIXDATA_STRUCT</p></td> <td class="enum_member_description"> <p>Generate <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure (needs the <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure definition from gdk-pixdata.h).</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-DUMP-MACROS:CAPS"></a>GDK_PIXDATA_DUMP_MACROS</p></td> <td class="enum_member_description"> <p>Generate <function>*_ROWSTRIDE</function>, <function>*_WIDTH</function>, <function>*_HEIGHT</function>, <function>*_BYTES_PER_PIXEL</function> and <function>*_RLE_PIXEL_DATA</function> or <function>*_PIXEL_DATA</function> macro definitions for the image.</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-DUMP-GTYPES:CAPS"></a>GDK_PIXDATA_DUMP_GTYPES</p></td> <td class="enum_member_description"> <p>Generate GLib data types instead of standard C data types.</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-DUMP-CTYPES:CAPS"></a>GDK_PIXDATA_DUMP_CTYPES</p></td> <td class="enum_member_description"> <p>Generate standard C data types instead of GLib data types.</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-DUMP-STATIC:CAPS"></a>GDK_PIXDATA_DUMP_STATIC</p></td> <td class="enum_member_description"> <p>Generate static symbols.</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-DUMP-CONST:CAPS"></a>GDK_PIXDATA_DUMP_CONST</p></td> <td class="enum_member_description"> <p>Generate const symbols.</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="GDK-PIXDATA-DUMP-RLE-DECODER:CAPS"></a>GDK_PIXDATA_DUMP_RLE_DECODER</p></td> <td class="enum_member_description"> <p>Provide a <function>*_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp)</function> macro definition to decode run-length encoded image data.</p> </td> <td class="enum_member_annotations"> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="GDK-PIXBUF-MAGIC-NUMBER:CAPS"></a><h3>GDK_PIXBUF_MAGIC_NUMBER</h3> <pre class="programlisting">#define GDK_PIXBUF_MAGIC_NUMBER (0x47646b50) /* 'GdkP' */ </pre> <div class="warning"><p><code class="literal">GDK_PIXBUF_MAGIC_NUMBER</code> is deprecated and should not be used in newly-written code.</p></div> <p>Magic number for <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structures.</p> </div> <hr> <div class="refsect2"> <a name="GDK-PIXDATA-HEADER-LENGTH:CAPS"></a><h3>GDK_PIXDATA_HEADER_LENGTH</h3> <pre class="programlisting">#define GDK_PIXDATA_HEADER_LENGTH (4 + 4 + 4 + 4 + 4 + 4) </pre> <div class="warning"><p><code class="literal">GDK_PIXDATA_HEADER_LENGTH</code> is deprecated and should not be used in newly-written code.</p></div> <p>The length of a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure without the <em class="parameter"><code>pixel_data</code></em> pointer.</p> </div> </div> </div> <div class="footer"> <hr>Generated by GTK-Doc V1.27</div> </body> </html>
[-] gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html
[edit]
[-] license.html
[edit]
[-] gdk-pixbuf-XlibRGB.html
[edit]
[-] gdk-pixbuf-csource.html
[edit]
[-] gdk-pixbuf-Xlib-Rendering.html
[edit]
[-] gdk-pixbuf-Module-Interface.html
[edit]
[-] gdk-pixbuf-Image-Data-in-Memory.html
[edit]
[-] up-insensitive.png
[edit]
[-] gdk-pixbuf-File-saving.html
[edit]
[-] home.png
[edit]
[+]
..
[-] annotation-glossary.html
[edit]
[-] gdk-pixbuf-X-Drawables-to-Pixbufs.html
[edit]
[-] right-insensitive.png
[edit]
[-] left-insensitive.png
[edit]
[-] gdk-pixbuf-File-Loading.html
[edit]
[-] gdk-pixbuf-gdk-pixbuf-Xlib-initialization.html
[edit]
[-] up.png
[edit]
[-] gdk-pixbuf-query-loaders.html
[edit]
[-] right.png
[edit]
[-] index.html
[edit]
[-] api-index-full.html
[edit]
[-] composite.png
[edit]
[-] rn02.html
[edit]
[-] style.css
[edit]
[-] gdk-pixbuf-Animations.html
[edit]
[-] rn01.html
[edit]
[-] gdk-pixbuf-Versioning.html
[edit]
[-] gdk-pixbuf.devhelp2
[edit]
[-] gdk-pixbuf-gdk-pixbuf-from-drawables.html
[edit]
[-] gdk-pixbuf-Utilities.html
[edit]
[-] gdk-pixbuf-The-GdkPixbuf-Structure.html
[edit]
[-] left.png
[edit]
[-] GdkPixbufLoader.html
[edit]
[-] gdk-pixbuf-gdk-pixbuf-rendering.html
[edit]
[-] gdk-pixbuf-Scaling.html
[edit]
[-] gdk-pixbuf-Inline-data.html
[edit]