MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //usr/local/ssl/share/gtk-doc/html/rsvg/rsvg-GdkPixbuf.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>Rendering SVGs with GdkPixbuf</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
<link rel="home" href="index.html" title="RSVG Reference Manual">
<link rel="up" href="pt04.html" title="Part&#160;IV.&#160;
Using RSVG with GdkPixbuf
">
<link rel="previous" href="pt04.html" title="Part&#160;IV.&#160;
Using RSVG with GdkPixbuf
">
<link rel="next" href="ix01.html" title="Index">
<meta name="generator" content="GTK-Doc V1.4 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="rsvg.html" title="Part&#160;I.&#160;RSVG Overview">
<link rel="part" href="pt02.html" title="Part&#160;II.&#160;
Using RSVG
">
<link rel="part" href="pt03.html" title="Part&#160;III.&#160;
Using RSVG with Cairo
">
<link rel="part" href="pt04.html" title="Part&#160;IV.&#160;
Using RSVG with GdkPixbuf
">
<link rel="index" href="ix01.html" title="Index">
</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="pt04.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="pt04.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">RSVG Reference Manual</th>
<td><a accesskey="n" href="ix01.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="#top_of_page" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#desc" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="rsvg-GdkPixbuf"></a><div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="top_of_page"></a>Rendering SVGs with GdkPixbuf</span></h2>
<p>Rendering SVGs with GdkPixbuf &#8212; <p>
How to render SVGs into GdkPixbufs, for easy use in GTK+ applications
</p></p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">



<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  <a href="rsvg-GdkPixbuf.html#rsvg-handle-get-pixbuf">rsvg_handle_get_pixbuf</a>          (RsvgHandle *handle);
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  <a href="rsvg-GdkPixbuf.html#rsvg-handle-get-pixbuf-sub">rsvg_handle_get_pixbuf_sub</a>      (RsvgHandle *handle,
                                             const char *id);
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  <a href="rsvg-GdkPixbuf.html#rsvg-pixbuf-from-file">rsvg_pixbuf_from_file</a>           (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *file_name,
                                             <a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  <a href="rsvg-GdkPixbuf.html#rsvg-pixbuf-from-file-at-zoom">rsvg_pixbuf_from_file_at_zoom</a>   (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *file_name,
                                             double x_zoom,
                                             double y_zoom,
                                             <a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  <a href="rsvg-GdkPixbuf.html#rsvg-pixbuf-from-file-at-size">rsvg_pixbuf_from_file_at_size</a>   (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *file_name,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height,
                                             <a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  <a href="rsvg-GdkPixbuf.html#rsvg-pixbuf-from-file-at-max-size">rsvg_pixbuf_from_file_at_max_size</a>
                                            (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *file_name,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> max_width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> max_height,
                                             <a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  <a href="rsvg-GdkPixbuf.html#rsvg-pixbuf-from-file-at-zoom-with-max">rsvg_pixbuf_from_file_at_zoom_with_max</a>
                                            (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *file_name,
                                             double x_zoom,
                                             double y_zoom,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> max_width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> max_height,
                                             <a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="desc"></a><h2>Description</h2>
<p>
GdkPixbuf is a library for image loading and manipulation. It is part of the cross-platform GTK+ widget toolkit.
</p>
</div>
<div class="refsect1" lang="en">
<a name="details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2663963"></a><h3>
<a name="rsvg-handle-get-pixbuf"></a>rsvg_handle_get_pixbuf ()</h3>
<a class="indexterm" name="id2663975"></a><pre class="programlisting"><a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  rsvg_handle_get_pixbuf          (RsvgHandle *handle);</pre>
<p>
Returns the pixbuf loaded by <span class="type">handle</span>.  The pixbuf returned will be reffed, so
the caller of this function must assume that ref.  If insufficient data has
been read to create the pixbuf, or an error occurred in loading, then <tt class="literal">NULL</tt>
will be returned.  Note that the pixbuf may not be complete until
<i class="parameter"><tt>rsvg_handle_close</tt></i> has been called.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><i class="parameter"><tt>handle</tt></i>&#160;:</span></td>
<td> An <span class="type">RsvgHandle</span>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the pixbuf loaded by <span class="type">handle</span>, or <tt class="literal">NULL</tt>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2664081"></a><h3>
<a name="rsvg-handle-get-pixbuf-sub"></a>rsvg_handle_get_pixbuf_sub ()</h3>
<a class="indexterm" name="id2664097"></a><pre class="programlisting"><a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  rsvg_handle_get_pixbuf_sub      (RsvgHandle *handle,
                                             const char *id);</pre>
<p>
Returns the pixbuf loaded by <span class="type">handle</span>.  The pixbuf returned will be reffed, so
the caller of this function must assume that ref.  If insufficient data has
been read to create the pixbuf, or an error occurred in loading, then <tt class="literal">NULL</tt>
will be returned.  Note that the pixbuf may not be complete until
<i class="parameter"><tt>rsvg_handle_close</tt></i> has been called.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><i class="parameter"><tt>handle</tt></i>&#160;:</span></td>
<td> An <span class="type">RsvgHandle</span>
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>id</tt></i>&#160;:</span></td>
<td> The id of an element inside the SVG, or <tt class="literal">NULL</tt> to render the whole SVG. For
example, if you have a layer called "layer1" that you wish to render, pass 
"#<span class="type">layer1</span>" as the id.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the pixbuf loaded by <span class="type">handle</span>, or <tt class="literal">NULL</tt>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2664245"></a><h3>
<a name="rsvg-pixbuf-from-file"></a>rsvg_pixbuf_from_file ()</h3>
<a class="indexterm" name="id2664263"></a><pre class="programlisting"><a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  rsvg_pixbuf_from_file           (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *file_name,
                                             <a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><tt class="literal">rsvg_pixbuf_from_file</tt> is deprecated and should not be used in newly-written code. Set up a cairo matrix and use <a href="rsvg-Core-API.html#rsvg-handle-new-from-file"><tt class="function">rsvg_handle_new_from_file()</tt></a> + <a href="rsvg-Cairo.html#rsvg-handle-render-cairo"><tt class="function">rsvg_handle_render_cairo()</tt></a> instead.</p>
</div>
<p>
Loads a new <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a> from <i class="parameter"><tt>file_name</tt></i> and returns it.  The caller must
assume the reference to the reurned pixbuf. If an error occurred, <i class="parameter"><tt>error</tt></i> is
set and <tt class="literal">NULL</tt> is returned.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><i class="parameter"><tt>file_name</tt></i>&#160;:</span></td>
<td> A file name
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>error</tt></i>&#160;:</span></td>
<td> return location for errors
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> A newly allocated <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>, or <tt class="literal">NULL</tt>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2664422"></a><h3>
<a name="rsvg-pixbuf-from-file-at-zoom"></a>rsvg_pixbuf_from_file_at_zoom ()</h3>
<a class="indexterm" name="id2664439"></a><pre class="programlisting"><a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  rsvg_pixbuf_from_file_at_zoom   (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *file_name,
                                             double x_zoom,
                                             double y_zoom,
                                             <a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><tt class="literal">rsvg_pixbuf_from_file_at_zoom</tt> is deprecated and should not be used in newly-written code. Set up a cairo matrix and use <a href="rsvg-Core-API.html#rsvg-handle-new-from-file"><tt class="function">rsvg_handle_new_from_file()</tt></a> + <a href="rsvg-Cairo.html#rsvg-handle-render-cairo"><tt class="function">rsvg_handle_render_cairo()</tt></a> instead.</p>
</div>
<p>
Loads a new <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a> from <i class="parameter"><tt>file_name</tt></i> and returns it.  This pixbuf is scaled
from the size indicated by the file by a factor of <i class="parameter"><tt>x_zoom</tt></i> and <i class="parameter"><tt>y_zoom</tt></i>.  The
caller must assume the reference to the returned pixbuf. If an error
occurred, <i class="parameter"><tt>error</tt></i> is set and <tt class="literal">NULL</tt> is returned.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><i class="parameter"><tt>file_name</tt></i>&#160;:</span></td>
<td> A file name
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>x_zoom</tt></i>&#160;:</span></td>
<td> The horizontal zoom factor
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>y_zoom</tt></i>&#160;:</span></td>
<td> The vertical zoom factor
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>error</tt></i>&#160;:</span></td>
<td> return location for errors
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> A newly allocated <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>, or <tt class="literal">NULL</tt>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2664654"></a><h3>
<a name="rsvg-pixbuf-from-file-at-size"></a>rsvg_pixbuf_from_file_at_size ()</h3>
<a class="indexterm" name="id2664672"></a><pre class="programlisting"><a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  rsvg_pixbuf_from_file_at_size   (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *file_name,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height,
                                             <a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><tt class="literal">rsvg_pixbuf_from_file_at_size</tt> is deprecated and should not be used in newly-written code. Set up a cairo matrix and use <a href="rsvg-Core-API.html#rsvg-handle-new-from-file"><tt class="function">rsvg_handle_new_from_file()</tt></a> + <a href="rsvg-Cairo.html#rsvg-handle-render-cairo"><tt class="function">rsvg_handle_render_cairo()</tt></a> instead.</p>
</div>
<p>
Loads a new <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a> from <i class="parameter"><tt>file_name</tt></i> and returns it.  This pixbuf is scaled
from the size indicated to the new size indicated by <i class="parameter"><tt>width</tt></i> and <i class="parameter"><tt>height</tt></i>.  If
either of these are -1, then the default size of the image being loaded is
used.  The caller must assume the reference to the returned pixbuf. If an
error occurred, <i class="parameter"><tt>error</tt></i> is set and <tt class="literal">NULL</tt> is returned.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><i class="parameter"><tt>file_name</tt></i>&#160;:</span></td>
<td> A file name
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>width</tt></i>&#160;:</span></td>
<td> The new width, or -1
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>height</tt></i>&#160;:</span></td>
<td> The new height, or -1
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>error</tt></i>&#160;:</span></td>
<td> return location for errors
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> A newly allocated <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>, or <tt class="literal">NULL</tt>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2664889"></a><h3>
<a name="rsvg-pixbuf-from-file-at-max-size"></a>rsvg_pixbuf_from_file_at_max_size ()</h3>
<a class="indexterm" name="id2664907"></a><pre class="programlisting"><a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  rsvg_pixbuf_from_file_at_max_size
                                            (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *file_name,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> max_width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> max_height,
                                             <a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><tt class="literal">rsvg_pixbuf_from_file_at_max_size</tt> is deprecated and should not be used in newly-written code. Set up a cairo matrix and use <a href="rsvg-Core-API.html#rsvg-handle-new-from-file"><tt class="function">rsvg_handle_new_from_file()</tt></a> + <a href="rsvg-Cairo.html#rsvg-handle-render-cairo"><tt class="function">rsvg_handle_render_cairo()</tt></a> instead.</p>
</div>
<p>
Loads a new <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a> from <i class="parameter"><tt>file_name</tt></i> and returns it.  This pixbuf is uniformly
scaled so that the it fits into a rectangle of size max_width * max_height. The
caller must assume the reference to the returned pixbuf. If an error occurred,
<i class="parameter"><tt>error</tt></i> is set and <tt class="literal">NULL</tt> is returned.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><i class="parameter"><tt>file_name</tt></i>&#160;:</span></td>
<td> A file name
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>max_width</tt></i>&#160;:</span></td>
<td> The requested max width
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>max_height</tt></i>&#160;:</span></td>
<td> The requested max heigh
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>error</tt></i>&#160;:</span></td>
<td> return location for errors
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> A newly allocated <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>, or <tt class="literal">NULL</tt>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2665111"></a><h3>
<a name="rsvg-pixbuf-from-file-at-zoom-with-max"></a>rsvg_pixbuf_from_file_at_zoom_with_max ()</h3>
<a class="indexterm" name="id2665128"></a><pre class="programlisting"><a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  rsvg_pixbuf_from_file_at_zoom_with_max
                                            (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *file_name,
                                             double x_zoom,
                                             double y_zoom,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> max_width,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> max_height,
                                             <a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><tt class="literal">rsvg_pixbuf_from_file_at_zoom_with_max</tt> is deprecated and should not be used in newly-written code. Set up a cairo matrix and use <a href="rsvg-Core-API.html#rsvg-handle-new-from-file"><tt class="function">rsvg_handle_new_from_file()</tt></a> + <a href="rsvg-Cairo.html#rsvg-handle-render-cairo"><tt class="function">rsvg_handle_render_cairo()</tt></a> instead.</p>
</div>
<p>
Loads a new <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a> from <i class="parameter"><tt>file_name</tt></i> and returns it.  This pixbuf is scaled
from the size indicated by the file by a factor of <i class="parameter"><tt>x_zoom</tt></i> and <i class="parameter"><tt>y_zoom</tt></i>. If the
resulting pixbuf would be larger than max_width/max_heigh it is uniformly scaled
down to fit in that rectangle.&#160;The caller must assume the reference to the
returned pixbuf. If an error occurred, <i class="parameter"><tt>error</tt></i> is set and <tt class="literal">NULL</tt> is returned.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><i class="parameter"><tt>file_name</tt></i>&#160;:</span></td>
<td> A file name
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>x_zoom</tt></i>&#160;:</span></td>
<td> The horizontal zoom factor
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>y_zoom</tt></i>&#160;:</span></td>
<td> The vertical zoom factor
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>max_width</tt></i>&#160;:</span></td>
<td> The requested max width
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>max_height</tt></i>&#160;:</span></td>
<td> The requested max heigh
</td>
</tr>
<tr>
<td>
<span class="term"><i class="parameter"><tt>error</tt></i>&#160;:</span></td>
<td> return location for errors
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> A newly allocated <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>, or <tt class="literal">NULL</tt>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>