<refentry id="gdk-pixbuf-gdk-pixbuf">
<refmeta>
<refentrytitle>The GdkPixbuf Structure</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK-PIXBUF Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>The GdkPixbuf Structure</refname><refpurpose>Information that describes an image.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

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


enum        <link linkend="GdkColorspace">GdkColorspace</link>;
<link linkend="GdkColorspace">GdkColorspace</link> <link linkend="gdk-pixbuf-get-colorspace">gdk_pixbuf_get_colorspace</link>     (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);
int         <link linkend="gdk-pixbuf-get-n-channels">gdk_pixbuf_get_n_channels</link>       (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);
<link linkend="gboolean">gboolean</link>    <link linkend="gdk-pixbuf-get-has-alpha">gdk_pixbuf_get_has_alpha</link>        (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);
int         <link linkend="gdk-pixbuf-get-bits-per-sample">gdk_pixbuf_get_bits_per_sample</link>  (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);
<link linkend="guchar">guchar</link>*     <link linkend="gdk-pixbuf-get-pixels">gdk_pixbuf_get_pixels</link>           (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);
int         <link linkend="gdk-pixbuf-get-width">gdk_pixbuf_get_width</link>            (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);
int         <link linkend="gdk-pixbuf-get-height">gdk_pixbuf_get_height</link>           (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);
int         <link linkend="gdk-pixbuf-get-rowstride">gdk_pixbuf_get_rowstride</link>        (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);

</synopsis>
</refsynopsisdiv>





<refsect1>
<title>Description</title>

  <para>
    The <structname>GdkPixbuf</structname> structure contains
    information that describes an image in memory.
  </para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GdkColorspace">enum GdkColorspace</title>
<programlisting>typedef enum {
	GDK_COLORSPACE_RGB
} GdkColorspace;
</programlisting>
  <para>
    This enumeration defines the color spaces that are supported by
    the &gdk-pixbuf; library.  Currently only RGB is supported.
  </para><informaltable pgwide="1" frame="none" role="enum">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row>
<entry><literal>GDK_COLORSPACE_RGB</literal></entry>
<entry>Indicates a red/green/blue additive color space.

</entry>
</row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-pixbuf-get-colorspace">gdk_pixbuf_get_colorspace ()</title>
<programlisting><link linkend="GdkColorspace">GdkColorspace</link> gdk_pixbuf_get_colorspace     (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);</programlisting>
<para>
Queries the color space of a pixbuf.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pixbuf</parameter>&nbsp;:</entry>
<entry> A pixbuf.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> Color space.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-pixbuf-get-n-channels">gdk_pixbuf_get_n_channels ()</title>
<programlisting>int         gdk_pixbuf_get_n_channels       (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);</programlisting>
<para>
Queries the number of channels of a pixbuf.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pixbuf</parameter>&nbsp;:</entry>
<entry> A pixbuf.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> Number of channels.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-pixbuf-get-has-alpha">gdk_pixbuf_get_has_alpha ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gdk_pixbuf_get_has_alpha        (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);</programlisting>
<para>
Queries whether a pixbuf has an alpha channel (opacity information).</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pixbuf</parameter>&nbsp;:</entry>
<entry> A pixbuf.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE if it has an alpha channel, FALSE otherwise.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-pixbuf-get-bits-per-sample">gdk_pixbuf_get_bits_per_sample ()</title>
<programlisting>int         gdk_pixbuf_get_bits_per_sample  (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);</programlisting>
<para>
Queries the number of bits per color sample in a pixbuf.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pixbuf</parameter>&nbsp;:</entry>
<entry> A pixbuf.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> Number of bits per color sample.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-pixbuf-get-pixels">gdk_pixbuf_get_pixels ()</title>
<programlisting><link linkend="guchar">guchar</link>*     gdk_pixbuf_get_pixels           (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);</programlisting>
<para>
Queries a pointer to the pixel data of a pixbuf.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pixbuf</parameter>&nbsp;:</entry>
<entry> A pixbuf.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> A pointer to the pixbuf's pixel data.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-pixbuf-get-width">gdk_pixbuf_get_width ()</title>
<programlisting>int         gdk_pixbuf_get_width            (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);</programlisting>
<para>
Queries the width of a pixbuf.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pixbuf</parameter>&nbsp;:</entry>
<entry> A pixbuf.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> Width in pixels.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-pixbuf-get-height">gdk_pixbuf_get_height ()</title>
<programlisting>int         gdk_pixbuf_get_height           (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);</programlisting>
<para>
Queries the height of a pixbuf.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pixbuf</parameter>&nbsp;:</entry>
<entry> A pixbuf.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> Height in pixels.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gdk-pixbuf-get-rowstride">gdk_pixbuf_get_rowstride ()</title>
<programlisting>int         gdk_pixbuf_get_rowstride        (const <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);</programlisting>
<para>
Queries the rowstride of a pixbuf, which is the number of bytes between rows.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pixbuf</parameter>&nbsp;:</entry>
<entry> A pixbuf.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> Number of bytes between rows.
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>




</refentry>
