gdk_pixbuf2 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/gdk_pixbuf2/rbgdk-pixbuf-format.c +49 -40
- data/ext/gdk_pixbuf2/rbgdk-pixbuf-loader.c +50 -40
- data/ext/gdk_pixbuf2/rbgdk-pixbuf.c +250 -168
- data/ext/gdk_pixbuf2/rbgdk-pixbuf.h +25 -18
- data/ext/gdk_pixbuf2/rbgdk-pixbuf2conversions.h +42 -0
- data/ext/gdk_pixbuf2/rbgdk-pixbuf2private.h +35 -0
- data/ext/gdk_pixbuf2/rbgdk-pixbufanimation.c +46 -83
- data/ext/gdk_pixbuf2/rbgdk-pixbufanimationiter.c +71 -0
- data/ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c +29 -17
- data/ext/gdk_pixbuf2/rbgdk-pixdata.c +81 -77
- data/lib/1.8/gdk_pixbuf2.so +0 -0
- data/lib/1.9/gdk_pixbuf2.so +0 -0
- data/vendor/local/bin/gdk-pixbuf-csource.exe +0 -0
- data/vendor/local/bin/gdk-pixbuf-query-loaders.exe +0 -0
- data/vendor/local/bin/libgdk_pixbuf-2.0-0.dll +0 -0
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h +40 -0
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h +200 -5
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h +82 -3
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h +170 -0
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-loader.h +6 -1
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h +5 -0
- data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-transform.h +42 -1
- data/vendor/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache +2 -2
- data/vendor/local/lib/gdk_pixbuf-2.0.lib +0 -0
- data/vendor/local/lib/libgdk_pixbuf-2.0.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/gdk-pixbuf-2.0.pc +4 -2
- data/vendor/local/manifest/{gdk-pixbuf-dev_2.22.1-1_win32.mft → gdk-pixbuf-dev_2.24.0-1_win32.mft} +12 -13
- data/vendor/local/manifest/{gdk-pixbuf_2.22.1-1_win32.mft → gdk-pixbuf_2.24.0-1_win32.mft} +2 -1
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/GdkPixbufLoader.html +181 -150
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/annotation-glossary.html +30 -9
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-10.html +3 -3
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-12.html +4 -4
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-14.html +6 -6
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-2.html +35 -3
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-4.html +13 -9
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-6.html +6 -6
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-8.html +5 -5
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-deprecated.html +7 -7
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-full.html +251 -629
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Animations.html +644 -0
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-File-Loading.html +372 -0
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-File-saving.html +642 -0
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Image-Data-in-Memory.html +417 -0
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Inline-data.html +495 -0
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Module-Interface.html +485 -184
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html +168 -0
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/{gdk-pixbuf-scaling.html → gdk-pixbuf-Scaling.html} +296 -190
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html +617 -0
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/{gdk-pixbuf-util.html → gdk-pixbuf-Utilities.html} +83 -93
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Versioning.html +63 -26
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-csource.html +16 -16
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf-from-drawables.html +8 -8
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf-rendering.html +8 -8
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-query-loaders.html +12 -12
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf.devhelp2 +149 -128
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/index.html +18 -18
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/index.sgml +184 -154
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/license.html +3 -3
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/rn01.html +18 -18
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/rn02.html +5 -5
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/style.css +2 -1
- data/vendor/local/share/locale/af/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ang/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ar/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/as/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ast/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/az/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/be/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/be@latin/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/bg/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/bn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/bn_IN/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/br/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/bs/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ca/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ca@valencia/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/crh/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/cs/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/cy/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/dz/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/el/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/en@shaw/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/en_CA/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/en_GB/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/eo/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/et/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/eu/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/fa/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/fi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ga/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/gl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/gu/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/he/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/hi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/hr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/hu/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/hy/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ia/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/io/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/is/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ja/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ka/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/kn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ko/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ku/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/li/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/lt/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/lv/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mai/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ml/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/mr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ms/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/my/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nb/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nds/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ne/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/nso/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/oc/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/or/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/pa/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ps/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/pt/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ro/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ru/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/si/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sq/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sr@ije/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sr@latin/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/sv/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ta/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/te/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/th/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/tk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/tt/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/ug/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/uk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/uz/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/uz@cyrillic/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/vi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/wa/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/xh/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/yi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/zh_CN/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/zh_HK/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/gdk-pixbuf.mo +0 -0
- data/vendor/local/share/man/man1/gdk-pixbuf-csource.1 +2 -2
- data/vendor/local/share/man/man1/gdk-pixbuf-query-loaders.1 +2 -2
- data/vendor/local/src/dieterv/packaging/gdk-pixbuf_2.24.0-1_win32.log +956 -0
- data/vendor/local/src/dieterv/packaging/gdk-pixbuf_2.24.0-1_win32.sh +97 -0
- metadata +26 -24
- data/ChangeLog +0 -482
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-animation.html +0 -654
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-creating.html +0 -406
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-file-loading.html +0 -402
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-file-saving.html +0 -685
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html +0 -460
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-inline.html +0 -516
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-refcounting.html +0 -132
- data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf.devhelp +0 -175
- data/vendor/local/src/tml/packaging/gdk-pixbuf_2.22.1-1_win32.log +0 -1012
- data/vendor/local/src/tml/packaging/gdk-pixbuf_2.22.1-1_win32.sh +0 -256
@@ -1,406 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
|
-
<title>creating</title>
|
6
|
-
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
7
|
-
<link rel="home" href="index.html" title="GDK-PixBuf Reference Manual">
|
8
|
-
<link rel="up" href="rn01.html" title="API Reference">
|
9
|
-
<link rel="prev" href="gdk-pixbuf-file-saving.html" title="file-saving">
|
10
|
-
<link rel="next" href="gdk-pixbuf-inline.html" title="inline">
|
11
|
-
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
|
12
|
-
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
-
</head>
|
14
|
-
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
15
|
-
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
|
16
|
-
<tr valign="middle">
|
17
|
-
<td><a accesskey="p" href="gdk-pixbuf-file-saving.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
18
|
-
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
|
19
|
-
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
|
20
|
-
<th width="100%" align="center">GDK-PixBuf Reference Manual</th>
|
21
|
-
<td><a accesskey="n" href="gdk-pixbuf-inline.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
22
|
-
</tr>
|
23
|
-
<tr><td colspan="5" class="shortcuts">
|
24
|
-
<a href="#gdk-pixbuf-creating.synopsis" class="shortcut">Top</a>
|
25
|
-
|
|
26
|
-
<a href="#gdk-pixbuf-creating.description" class="shortcut">Description</a>
|
27
|
-
</td></tr>
|
28
|
-
</table>
|
29
|
-
<div class="refentry" title="creating">
|
30
|
-
<a name="gdk-pixbuf-creating"></a><div class="titlepage"></div>
|
31
|
-
<div class="refnamediv"><table width="100%"><tr>
|
32
|
-
<td valign="top">
|
33
|
-
<h2><span class="refentrytitle"><a name="gdk-pixbuf-creating.top_of_page"></a>creating</span></h2>
|
34
|
-
<p>creating</p>
|
35
|
-
</td>
|
36
|
-
<td valign="top" align="right"></td>
|
37
|
-
</tr></table></div>
|
38
|
-
<div class="refsynopsisdiv" title="Synopsis">
|
39
|
-
<a name="gdk-pixbuf-creating.synopsis"></a><h2>Synopsis</h2>
|
40
|
-
<pre class="synopsis">
|
41
|
-
#include <gdk-pixbuf/gdk-pixbuf.h>
|
42
|
-
|
43
|
-
<a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-creating.html#gdk-pixbuf-new" title="gdk_pixbuf_new ()">gdk_pixbuf_new</a> (<em class="parameter"><code><a class="link" href="gdk-pixbuf-gdk-pixbuf.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>,
|
45
|
-
<em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
|
46
|
-
<em class="parameter"><code><span class="type">int</span> width</code></em>,
|
47
|
-
<em class="parameter"><code><span class="type">int</span> height</code></em>);
|
48
|
-
<a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-creating.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>,
|
49
|
-
<em class="parameter"><code><a class="link" href="gdk-pixbuf-gdk-pixbuf.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>,
|
51
|
-
<em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
|
52
|
-
<em class="parameter"><code><span class="type">int</span> width</code></em>,
|
53
|
-
<em class="parameter"><code><span class="type">int</span> height</code></em>,
|
54
|
-
<em class="parameter"><code><span class="type">int</span> rowstride</code></em>,
|
55
|
-
<em class="parameter"><code><a class="link" href="gdk-pixbuf-refcounting.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>);
|
57
|
-
<a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-creating.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-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a>* <a class="link" href="gdk-pixbuf-creating.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>);
|
62
|
-
<a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-creating.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-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src_pixbuf</code></em>,
|
63
|
-
<em class="parameter"><code><span class="type">int</span> src_x</code></em>,
|
64
|
-
<em class="parameter"><code><span class="type">int</span> src_y</code></em>,
|
65
|
-
<em class="parameter"><code><span class="type">int</span> width</code></em>,
|
66
|
-
<em class="parameter"><code><span class="type">int</span> height</code></em>);
|
67
|
-
<a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-creating.html#gdk-pixbuf-copy" title="gdk_pixbuf_copy ()">gdk_pixbuf_copy</a> (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);
|
68
|
-
</pre>
|
69
|
-
</div>
|
70
|
-
<div class="refsect1" title="Description">
|
71
|
-
<a name="gdk-pixbuf-creating.description"></a><h2>Description</h2>
|
72
|
-
<p>
|
73
|
-
</p>
|
74
|
-
</div>
|
75
|
-
<div class="refsect1" title="Details">
|
76
|
-
<a name="gdk-pixbuf-creating.details"></a><h2>Details</h2>
|
77
|
-
<div class="refsect2" title="gdk_pixbuf_new ()">
|
78
|
-
<a name="gdk-pixbuf-new"></a><h3>gdk_pixbuf_new ()</h3>
|
79
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new (<em class="parameter"><code><a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkColorspace" title="enum GdkColorspace"><span class="type">GdkColorspace</span></a> colorspace</code></em>,
|
80
|
-
<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>,
|
81
|
-
<em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
|
82
|
-
<em class="parameter"><code><span class="type">int</span> width</code></em>,
|
83
|
-
<em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
|
84
|
-
<p>
|
85
|
-
Creates a new <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> structure and allocates a buffer for it. The
|
86
|
-
buffer has an optimal rowstride. Note that the buffer is not cleared;
|
87
|
-
you will have to fill it completely yourself.
|
88
|
-
</p>
|
89
|
-
<div class="variablelist"><table border="0">
|
90
|
-
<col align="left" valign="top">
|
91
|
-
<tbody>
|
92
|
-
<tr>
|
93
|
-
<td><p><span class="term"><em class="parameter"><code>colorspace</code></em> :</span></p></td>
|
94
|
-
<td>Color space for image
|
95
|
-
</td>
|
96
|
-
</tr>
|
97
|
-
<tr>
|
98
|
-
<td><p><span class="term"><em class="parameter"><code>has_alpha</code></em> :</span></p></td>
|
99
|
-
<td>Whether the image should have transparency information
|
100
|
-
</td>
|
101
|
-
</tr>
|
102
|
-
<tr>
|
103
|
-
<td><p><span class="term"><em class="parameter"><code>bits_per_sample</code></em> :</span></p></td>
|
104
|
-
<td>Number of bits per color sample
|
105
|
-
</td>
|
106
|
-
</tr>
|
107
|
-
<tr>
|
108
|
-
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
109
|
-
<td>Width of image in pixels, must be > 0
|
110
|
-
</td>
|
111
|
-
</tr>
|
112
|
-
<tr>
|
113
|
-
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
114
|
-
<td>Height of image in pixels, must be > 0
|
115
|
-
</td>
|
116
|
-
</tr>
|
117
|
-
<tr>
|
118
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
119
|
-
<td> A newly-created <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> with a reference count of 1, or
|
120
|
-
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not enough memory could be allocated for the image buffer.
|
121
|
-
</td>
|
122
|
-
</tr>
|
123
|
-
</tbody>
|
124
|
-
</table></div>
|
125
|
-
</div>
|
126
|
-
<hr>
|
127
|
-
<div class="refsect2" title="gdk_pixbuf_new_from_data ()">
|
128
|
-
<a name="gdk-pixbuf-new-from-data"></a><h3>gdk_pixbuf_new_from_data ()</h3>
|
129
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-gdk-pixbuf.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>,
|
130
|
-
<em class="parameter"><code><a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkColorspace" title="enum GdkColorspace"><span class="type">GdkColorspace</span></a> colorspace</code></em>,
|
131
|
-
<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>,
|
132
|
-
<em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
|
133
|
-
<em class="parameter"><code><span class="type">int</span> width</code></em>,
|
134
|
-
<em class="parameter"><code><span class="type">int</span> height</code></em>,
|
135
|
-
<em class="parameter"><code><span class="type">int</span> rowstride</code></em>,
|
136
|
-
<em class="parameter"><code><a class="link" href="gdk-pixbuf-refcounting.html#GdkPixbufDestroyNotify" title="GdkPixbufDestroyNotify ()"><span class="type">GdkPixbufDestroyNotify</span></a> destroy_fn</code></em>,
|
137
|
-
<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>
|
138
|
-
<p>
|
139
|
-
Creates a new <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> out of in-memory image data. Currently only RGB
|
140
|
-
images with 8 bits per sample are supported.
|
141
|
-
</p>
|
142
|
-
<div class="variablelist"><table border="0">
|
143
|
-
<col align="left" valign="top">
|
144
|
-
<tbody>
|
145
|
-
<tr>
|
146
|
-
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
|
147
|
-
<td>Image data in 8-bit/sample packed format
|
148
|
-
</td>
|
149
|
-
</tr>
|
150
|
-
<tr>
|
151
|
-
<td><p><span class="term"><em class="parameter"><code>colorspace</code></em> :</span></p></td>
|
152
|
-
<td>Colorspace for the image data
|
153
|
-
</td>
|
154
|
-
</tr>
|
155
|
-
<tr>
|
156
|
-
<td><p><span class="term"><em class="parameter"><code>has_alpha</code></em> :</span></p></td>
|
157
|
-
<td>Whether the data has an opacity channel
|
158
|
-
</td>
|
159
|
-
</tr>
|
160
|
-
<tr>
|
161
|
-
<td><p><span class="term"><em class="parameter"><code>bits_per_sample</code></em> :</span></p></td>
|
162
|
-
<td>Number of bits per sample
|
163
|
-
</td>
|
164
|
-
</tr>
|
165
|
-
<tr>
|
166
|
-
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
167
|
-
<td>Width of the image in pixels, must be > 0
|
168
|
-
</td>
|
169
|
-
</tr>
|
170
|
-
<tr>
|
171
|
-
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
172
|
-
<td>Height of the image in pixels, must be > 0
|
173
|
-
</td>
|
174
|
-
</tr>
|
175
|
-
<tr>
|
176
|
-
<td><p><span class="term"><em class="parameter"><code>rowstride</code></em> :</span></p></td>
|
177
|
-
<td>Distance in bytes between row starts
|
178
|
-
</td>
|
179
|
-
</tr>
|
180
|
-
<tr>
|
181
|
-
<td><p><span class="term"><em class="parameter"><code>destroy_fn</code></em> :</span></p></td>
|
182
|
-
<td> Function used to free the data when the pixbuf's reference count
|
183
|
-
drops to zero, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the data should not be freed. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
|
184
|
-
</td>
|
185
|
-
</tr>
|
186
|
-
<tr>
|
187
|
-
<td><p><span class="term"><em class="parameter"><code>destroy_fn_data</code></em> :</span></p></td>
|
188
|
-
<td>Closure data to pass to the destroy notification function
|
189
|
-
</td>
|
190
|
-
</tr>
|
191
|
-
<tr>
|
192
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
193
|
-
<td> A newly-created <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> structure with a reference count of 1. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
|
194
|
-
</td>
|
195
|
-
</tr>
|
196
|
-
</tbody>
|
197
|
-
</table></div>
|
198
|
-
</div>
|
199
|
-
<hr>
|
200
|
-
<div class="refsect2" title="gdk_pixbuf_new_from_xpm_data ()">
|
201
|
-
<a name="gdk-pixbuf-new-from-xpm-data"></a><h3>gdk_pixbuf_new_from_xpm_data ()</h3>
|
202
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_xpm_data (<em class="parameter"><code>const <span class="type">char</span> **data</code></em>);</pre>
|
203
|
-
<p>
|
204
|
-
Creates a new pixbuf by parsing XPM data in memory. This data is commonly
|
205
|
-
the result of including an XPM file into a program's C source.
|
206
|
-
</p>
|
207
|
-
<div class="variablelist"><table border="0">
|
208
|
-
<col align="left" valign="top">
|
209
|
-
<tbody>
|
210
|
-
<tr>
|
211
|
-
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
|
212
|
-
<td>Pointer to inline XPM data.
|
213
|
-
</td>
|
214
|
-
</tr>
|
215
|
-
<tr>
|
216
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
217
|
-
<td> A newly-created pixbuf with a reference count of 1.
|
218
|
-
</td>
|
219
|
-
</tr>
|
220
|
-
</tbody>
|
221
|
-
</table></div>
|
222
|
-
</div>
|
223
|
-
<hr>
|
224
|
-
<div class="refsect2" title="gdk_pixbuf_new_from_inline ()">
|
225
|
-
<a name="gdk-pixbuf-new-from-inline"></a><h3>gdk_pixbuf_new_from_inline ()</h3>
|
226
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-gdk-pixbuf.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>,
|
227
|
-
<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>,
|
228
|
-
<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>,
|
229
|
-
<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>
|
230
|
-
<p>
|
231
|
-
Create a <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> from a flat representation that is suitable for
|
232
|
-
storing as inline data in a program. This is useful if you want to
|
233
|
-
ship a program with images, but don't want to depend on any
|
234
|
-
external files.
|
235
|
-
</p>
|
236
|
-
<p>
|
237
|
-
gdk-pixbuf ships with a program called <span class="command"><strong>gdk-pixbuf-csource</strong></span>
|
238
|
-
which allows for conversion of <a href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbufs</span></a> into such a inline representation.
|
239
|
-
In almost all cases, you should pass the <code class="option">--raw</code> flag to
|
240
|
-
<span class="command"><strong>gdk-pixbuf-csource</strong></span>. A sample invocation would be:
|
241
|
-
</p>
|
242
|
-
<p>
|
243
|
-
</p>
|
244
|
-
<div class="informalexample">
|
245
|
-
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
246
|
-
<tbody>
|
247
|
-
<tr>
|
248
|
-
<td class="listing_lines" align="right"><pre>1</pre></td>
|
249
|
-
<td class="listing_code"><pre class="programlisting"><span class="normal">gdk</span><span class="symbol">-</span><span class="normal">pixbuf</span><span class="symbol">-</span><span class="normal">csource </span><span class="symbol">--</span><span class="normal">raw </span><span class="symbol">--</span><span class="normal">name</span><span class="symbol">=</span><span class="usertype">myimage_inline</span><span class="normal"> myimage</span><span class="symbol">.</span><span class="normal">png</span></pre></td>
|
250
|
-
</tr>
|
251
|
-
</tbody>
|
252
|
-
</table>
|
253
|
-
</div>
|
254
|
-
|
255
|
-
<p>
|
256
|
-
</p>
|
257
|
-
<p>
|
258
|
-
For the typical case where the inline pixbuf is read-only static data,
|
259
|
-
you don't need to copy the pixel data unless you intend to write to
|
260
|
-
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
|
261
|
-
<code class="option">--rle</code> to <span class="command"><strong>gdk-pixbuf-csource</strong></span>, a copy
|
262
|
-
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
|
263
|
-
generally a bad idea.)
|
264
|
-
</p>
|
265
|
-
<p>
|
266
|
-
If you create a pixbuf from const inline data compiled into your
|
267
|
-
program, it's probably safe to ignore errors and disable length checks,
|
268
|
-
since things will always succeed:
|
269
|
-
</p>
|
270
|
-
<div class="informalexample">
|
271
|
-
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
272
|
-
<tbody>
|
273
|
-
<tr>
|
274
|
-
<td class="listing_lines" align="right"><pre>1</pre></td>
|
275
|
-
<td class="listing_code"><pre class="programlisting"><span class="normal">pixbuf </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gdk-pixbuf-creating.html#gdk-pixbuf-new-from-inline">gdk_pixbuf_new_from_inline</a></span><span class="normal"> </span><span class="symbol">(-</span><span class="number">1</span><span class="symbol">,</span><span class="normal"> myimage_inline</span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span></pre></td>
|
276
|
-
</tr>
|
277
|
-
</tbody>
|
278
|
-
</table>
|
279
|
-
</div>
|
280
|
-
|
281
|
-
<p>
|
282
|
-
</p>
|
283
|
-
<p>
|
284
|
-
For non-const inline data, you could get out of memory. For untrusted
|
285
|
-
inline data located at runtime, you could have corrupt inline data in
|
286
|
-
addition.
|
287
|
-
</p>
|
288
|
-
<div class="variablelist"><table border="0">
|
289
|
-
<col align="left" valign="top">
|
290
|
-
<tbody>
|
291
|
-
<tr>
|
292
|
-
<td><p><span class="term"><em class="parameter"><code>data_length</code></em> :</span></p></td>
|
293
|
-
<td>Length in bytes of the <em class="parameter"><code>data</code></em> argument or -1 to
|
294
|
-
disable length checks
|
295
|
-
</td>
|
296
|
-
</tr>
|
297
|
-
<tr>
|
298
|
-
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
|
299
|
-
<td>Byte data containing a serialized <a class="link" href="gdk-pixbuf-inline.html#GdkPixdata" title="GdkPixdata"><span class="type">GdkPixdata</span></a> structure
|
300
|
-
</td>
|
301
|
-
</tr>
|
302
|
-
<tr>
|
303
|
-
<td><p><span class="term"><em class="parameter"><code>copy_pixels</code></em> :</span></p></td>
|
304
|
-
<td>Whether to copy the pixel data, or use direct pointers
|
305
|
-
<em class="parameter"><code>data</code></em> for the resulting pixbuf
|
306
|
-
</td>
|
307
|
-
</tr>
|
308
|
-
<tr>
|
309
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
310
|
-
<td>
|
311
|
-
<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
|
312
|
-
</td>
|
313
|
-
</tr>
|
314
|
-
<tr>
|
315
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
316
|
-
<td> A newly-created <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> structure with a reference,
|
317
|
-
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.
|
318
|
-
</td>
|
319
|
-
</tr>
|
320
|
-
</tbody>
|
321
|
-
</table></div>
|
322
|
-
</div>
|
323
|
-
<hr>
|
324
|
-
<div class="refsect2" title="gdk_pixbuf_new_subpixbuf ()">
|
325
|
-
<a name="gdk-pixbuf-new-subpixbuf"></a><h3>gdk_pixbuf_new_subpixbuf ()</h3>
|
326
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_subpixbuf (<em class="parameter"><code><a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src_pixbuf</code></em>,
|
327
|
-
<em class="parameter"><code><span class="type">int</span> src_x</code></em>,
|
328
|
-
<em class="parameter"><code><span class="type">int</span> src_y</code></em>,
|
329
|
-
<em class="parameter"><code><span class="type">int</span> width</code></em>,
|
330
|
-
<em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
|
331
|
-
<p>
|
332
|
-
Creates a new pixbuf which represents a sub-region of
|
333
|
-
<em class="parameter"><code>src_pixbuf</code></em>. The new pixbuf shares its pixels with the
|
334
|
-
original pixbuf, so writing to one affects both.
|
335
|
-
The new pixbuf holds a reference to <em class="parameter"><code>src_pixbuf</code></em>, so
|
336
|
-
<em class="parameter"><code>src_pixbuf</code></em> will not be finalized until the new pixbuf
|
337
|
-
is finalized.
|
338
|
-
</p>
|
339
|
-
<div class="variablelist"><table border="0">
|
340
|
-
<col align="left" valign="top">
|
341
|
-
<tbody>
|
342
|
-
<tr>
|
343
|
-
<td><p><span class="term"><em class="parameter"><code>src_pixbuf</code></em> :</span></p></td>
|
344
|
-
<td>a <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
|
345
|
-
</td>
|
346
|
-
</tr>
|
347
|
-
<tr>
|
348
|
-
<td><p><span class="term"><em class="parameter"><code>src_x</code></em> :</span></p></td>
|
349
|
-
<td>X coord in <em class="parameter"><code>src_pixbuf</code></em>
|
350
|
-
</td>
|
351
|
-
</tr>
|
352
|
-
<tr>
|
353
|
-
<td><p><span class="term"><em class="parameter"><code>src_y</code></em> :</span></p></td>
|
354
|
-
<td>Y coord in <em class="parameter"><code>src_pixbuf</code></em>
|
355
|
-
</td>
|
356
|
-
</tr>
|
357
|
-
<tr>
|
358
|
-
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
359
|
-
<td>width of region in <em class="parameter"><code>src_pixbuf</code></em>
|
360
|
-
</td>
|
361
|
-
</tr>
|
362
|
-
<tr>
|
363
|
-
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
364
|
-
<td>height of region in <em class="parameter"><code>src_pixbuf</code></em>
|
365
|
-
</td>
|
366
|
-
</tr>
|
367
|
-
<tr>
|
368
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
369
|
-
<td> a new pixbuf. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
|
370
|
-
</td>
|
371
|
-
</tr>
|
372
|
-
</tbody>
|
373
|
-
</table></div>
|
374
|
-
</div>
|
375
|
-
<hr>
|
376
|
-
<div class="refsect2" title="gdk_pixbuf_copy ()">
|
377
|
-
<a name="gdk-pixbuf-copy"></a><h3>gdk_pixbuf_copy ()</h3>
|
378
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_copy (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);</pre>
|
379
|
-
<p>
|
380
|
-
Creates a new <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> with a copy of the information in the specified
|
381
|
-
<em class="parameter"><code>pixbuf</code></em>.
|
382
|
-
</p>
|
383
|
-
<div class="variablelist"><table border="0">
|
384
|
-
<col align="left" valign="top">
|
385
|
-
<tbody>
|
386
|
-
<tr>
|
387
|
-
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
|
388
|
-
<td>A pixbuf.
|
389
|
-
</td>
|
390
|
-
</tr>
|
391
|
-
<tr>
|
392
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
393
|
-
<td> A newly-created pixbuf with a reference 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
|
394
|
-
not enough memory could be allocated. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
|
395
|
-
</td>
|
396
|
-
</tr>
|
397
|
-
</tbody>
|
398
|
-
</table></div>
|
399
|
-
</div>
|
400
|
-
</div>
|
401
|
-
</div>
|
402
|
-
<div class="footer">
|
403
|
-
<hr>
|
404
|
-
Generated by GTK-Doc V1.15</div>
|
405
|
-
</body>
|
406
|
-
</html>
|
@@ -1,402 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
|
-
<title>file-loading</title>
|
6
|
-
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
7
|
-
<link rel="home" href="index.html" title="GDK-PixBuf Reference Manual">
|
8
|
-
<link rel="up" href="rn01.html" title="API Reference">
|
9
|
-
<link rel="prev" href="gdk-pixbuf-refcounting.html" title="refcounting">
|
10
|
-
<link rel="next" href="gdk-pixbuf-file-saving.html" title="file-saving">
|
11
|
-
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
|
12
|
-
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
-
</head>
|
14
|
-
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
15
|
-
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
|
16
|
-
<tr valign="middle">
|
17
|
-
<td><a accesskey="p" href="gdk-pixbuf-refcounting.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
18
|
-
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
|
19
|
-
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
|
20
|
-
<th width="100%" align="center">GDK-PixBuf Reference Manual</th>
|
21
|
-
<td><a accesskey="n" href="gdk-pixbuf-file-saving.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
22
|
-
</tr>
|
23
|
-
<tr><td colspan="5" class="shortcuts">
|
24
|
-
<a href="#gdk-pixbuf-file-loading.synopsis" class="shortcut">Top</a>
|
25
|
-
|
|
26
|
-
<a href="#gdk-pixbuf-file-loading.description" class="shortcut">Description</a>
|
27
|
-
</td></tr>
|
28
|
-
</table>
|
29
|
-
<div class="refentry" title="file-loading">
|
30
|
-
<a name="gdk-pixbuf-file-loading"></a><div class="titlepage"></div>
|
31
|
-
<div class="refnamediv"><table width="100%"><tr>
|
32
|
-
<td valign="top">
|
33
|
-
<h2><span class="refentrytitle"><a name="gdk-pixbuf-file-loading.top_of_page"></a>file-loading</span></h2>
|
34
|
-
<p>file-loading</p>
|
35
|
-
</td>
|
36
|
-
<td valign="top" align="right"></td>
|
37
|
-
</tr></table></div>
|
38
|
-
<div class="refsynopsisdiv" title="Synopsis">
|
39
|
-
<a name="gdk-pixbuf-file-loading.synopsis"></a><h2>Synopsis</h2>
|
40
|
-
<pre class="synopsis">
|
41
|
-
#include <gdk-pixbuf/gdk-pixbuf.h>
|
42
|
-
|
43
|
-
<a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-file-loading.html#gdk-pixbuf-new-from-file" title="gdk_pixbuf_new_from_file ()">gdk_pixbuf_new_from_file</a> (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
|
44
|
-
<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>);
|
45
|
-
<a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-file-loading.html#gdk-pixbuf-new-from-file-at-size" title="gdk_pixbuf_new_from_file_at_size ()">gdk_pixbuf_new_from_file_at_size</a> (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
|
46
|
-
<em class="parameter"><code><span class="type">int</span> width</code></em>,
|
47
|
-
<em class="parameter"><code><span class="type">int</span> height</code></em>,
|
48
|
-
<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>);
|
49
|
-
<a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-file-loading.html#gdk-pixbuf-new-from-file-at-scale" title="gdk_pixbuf_new_from_file_at_scale ()">gdk_pixbuf_new_from_file_at_scale</a> (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
|
50
|
-
<em class="parameter"><code><span class="type">int</span> width</code></em>,
|
51
|
-
<em class="parameter"><code><span class="type">int</span> height</code></em>,
|
52
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> preserve_aspect_ratio</code></em>,
|
53
|
-
<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>);
|
54
|
-
<a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="GdkPixbufFormat"><span class="returnvalue">GdkPixbufFormat</span></a> * <a class="link" href="gdk-pixbuf-file-loading.html#gdk-pixbuf-get-file-info" title="gdk_pixbuf_get_file_info ()">gdk_pixbuf_get_file_info</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
|
55
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *width</code></em>,
|
56
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *height</code></em>);
|
57
|
-
<a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-file-loading.html#gdk-pixbuf-new-from-stream" title="gdk_pixbuf_new_from_stream ()">gdk_pixbuf_new_from_stream</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GInputStream.html"><span class="type">GInputStream</span></a> *stream</code></em>,
|
58
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
|
59
|
-
<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>);
|
60
|
-
<a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-file-loading.html#gdk-pixbuf-new-from-stream-at-scale" title="gdk_pixbuf_new_from_stream_at_scale ()">gdk_pixbuf_new_from_stream_at_scale</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GInputStream.html"><span class="type">GInputStream</span></a> *stream</code></em>,
|
61
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
|
62
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
|
63
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> preserve_aspect_ratio</code></em>,
|
64
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
|
65
|
-
<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>);
|
66
|
-
</pre>
|
67
|
-
</div>
|
68
|
-
<div class="refsect1" title="Description">
|
69
|
-
<a name="gdk-pixbuf-file-loading.description"></a><h2>Description</h2>
|
70
|
-
<p>
|
71
|
-
</p>
|
72
|
-
</div>
|
73
|
-
<div class="refsect1" title="Details">
|
74
|
-
<a name="gdk-pixbuf-file-loading.details"></a><h2>Details</h2>
|
75
|
-
<div class="refsect2" title="gdk_pixbuf_new_from_file ()">
|
76
|
-
<a name="gdk-pixbuf-new-from-file"></a><h3>gdk_pixbuf_new_from_file ()</h3>
|
77
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_file (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
|
78
|
-
<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>
|
79
|
-
<p>
|
80
|
-
Creates a new pixbuf by loading an image from a file. The file format is
|
81
|
-
detected automatically. If <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned, then <em class="parameter"><code>error</code></em> will be set.
|
82
|
-
Possible errors are in the <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a> and <a href="http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#G-FILE-ERROR:CAPS"><span class="type">G_FILE_ERROR</span></a> domains.
|
83
|
-
</p>
|
84
|
-
<div class="variablelist"><table border="0">
|
85
|
-
<col align="left" valign="top">
|
86
|
-
<tbody>
|
87
|
-
<tr>
|
88
|
-
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
|
89
|
-
<td>Name of file to load, in the GLib file name encoding
|
90
|
-
</td>
|
91
|
-
</tr>
|
92
|
-
<tr>
|
93
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
94
|
-
<td>Return location for an error
|
95
|
-
</td>
|
96
|
-
</tr>
|
97
|
-
<tr>
|
98
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
99
|
-
<td> A newly-created pixbuf with a reference 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
|
100
|
-
any of several error conditions occurred: the file could not be opened,
|
101
|
-
there was no loader for the file's format, there was not enough memory to
|
102
|
-
allocate the image buffer, or the image file contained invalid data.
|
103
|
-
</td>
|
104
|
-
</tr>
|
105
|
-
</tbody>
|
106
|
-
</table></div>
|
107
|
-
</div>
|
108
|
-
<hr>
|
109
|
-
<div class="refsect2" title="gdk_pixbuf_new_from_file_at_size ()">
|
110
|
-
<a name="gdk-pixbuf-new-from-file-at-size"></a><h3>gdk_pixbuf_new_from_file_at_size ()</h3>
|
111
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_file_at_size (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
|
112
|
-
<em class="parameter"><code><span class="type">int</span> width</code></em>,
|
113
|
-
<em class="parameter"><code><span class="type">int</span> height</code></em>,
|
114
|
-
<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>
|
115
|
-
<p>
|
116
|
-
Creates a new pixbuf by loading an image from a file.
|
117
|
-
The file format is detected automatically. If <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned, then
|
118
|
-
<em class="parameter"><code>error</code></em> will be set. Possible errors are in the <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a> and
|
119
|
-
<a href="http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#G-FILE-ERROR:CAPS"><span class="type">G_FILE_ERROR</span></a> domains.
|
120
|
-
</p>
|
121
|
-
<p>
|
122
|
-
The image will be scaled to fit in the requested size, preserving
|
123
|
-
the image's aspect ratio. Note that the returned pixbuf may be smaller
|
124
|
-
than <em class="parameter"><code>width</code></em> x <em class="parameter"><code>height</code></em>, if the aspect ratio requires it. To load
|
125
|
-
and image at the requested size, regardless of aspect ratio, use
|
126
|
-
<a class="link" href="gdk-pixbuf-file-loading.html#gdk-pixbuf-new-from-file-at-scale" title="gdk_pixbuf_new_from_file_at_scale ()"><code class="function">gdk_pixbuf_new_from_file_at_scale()</code></a>.
|
127
|
-
</p>
|
128
|
-
<div class="variablelist"><table border="0">
|
129
|
-
<col align="left" valign="top">
|
130
|
-
<tbody>
|
131
|
-
<tr>
|
132
|
-
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
|
133
|
-
<td>Name of file to load, in the GLib file name encoding
|
134
|
-
</td>
|
135
|
-
</tr>
|
136
|
-
<tr>
|
137
|
-
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
138
|
-
<td>The width the image should have or -1 to not constrain the width
|
139
|
-
</td>
|
140
|
-
</tr>
|
141
|
-
<tr>
|
142
|
-
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
143
|
-
<td>The height the image should have or -1 to not constrain the height
|
144
|
-
</td>
|
145
|
-
</tr>
|
146
|
-
<tr>
|
147
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
148
|
-
<td>Return location for an error
|
149
|
-
</td>
|
150
|
-
</tr>
|
151
|
-
<tr>
|
152
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
153
|
-
<td> A newly-created pixbuf with a reference count of 1, or
|
154
|
-
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if any of several error conditions occurred: the file could not
|
155
|
-
be opened, there was no loader for the file's format, there was not
|
156
|
-
enough memory to allocate the image buffer, or the image file contained
|
157
|
-
invalid data.
|
158
|
-
|
159
|
-
</td>
|
160
|
-
</tr>
|
161
|
-
</tbody>
|
162
|
-
</table></div>
|
163
|
-
<p class="since">Since 2.4</p>
|
164
|
-
</div>
|
165
|
-
<hr>
|
166
|
-
<div class="refsect2" title="gdk_pixbuf_new_from_file_at_scale ()">
|
167
|
-
<a name="gdk-pixbuf-new-from-file-at-scale"></a><h3>gdk_pixbuf_new_from_file_at_scale ()</h3>
|
168
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_file_at_scale (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
|
169
|
-
<em class="parameter"><code><span class="type">int</span> width</code></em>,
|
170
|
-
<em class="parameter"><code><span class="type">int</span> height</code></em>,
|
171
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> preserve_aspect_ratio</code></em>,
|
172
|
-
<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>
|
173
|
-
<p>
|
174
|
-
Creates a new pixbuf by loading an image from a file. The file format is
|
175
|
-
detected automatically. If <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned, then <em class="parameter"><code>error</code></em> will be set.
|
176
|
-
Possible errors are in the <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a> and <a href="http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#G-FILE-ERROR:CAPS"><span class="type">G_FILE_ERROR</span></a> domains.
|
177
|
-
The image will be scaled to fit in the requested size, optionally preserving
|
178
|
-
the image's aspect ratio.
|
179
|
-
</p>
|
180
|
-
<p>
|
181
|
-
When preserving the aspect ratio, a <em class="parameter"><code>width</code></em> of -1 will cause the image
|
182
|
-
to be scaled to the exact given height, and a <em class="parameter"><code>height</code></em> of -1 will cause
|
183
|
-
the image to be scaled to the exact given width. When not preserving
|
184
|
-
aspect ratio, a <em class="parameter"><code>width</code></em> or <em class="parameter"><code>height</code></em> of -1 means to not scale the image
|
185
|
-
at all in that dimension. Negative values for <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> are
|
186
|
-
allowed since 2.8.
|
187
|
-
</p>
|
188
|
-
<div class="variablelist"><table border="0">
|
189
|
-
<col align="left" valign="top">
|
190
|
-
<tbody>
|
191
|
-
<tr>
|
192
|
-
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
|
193
|
-
<td>Name of file to load, in the GLib file name encoding
|
194
|
-
</td>
|
195
|
-
</tr>
|
196
|
-
<tr>
|
197
|
-
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
198
|
-
<td>The width the image should have or -1 to not constrain the width
|
199
|
-
</td>
|
200
|
-
</tr>
|
201
|
-
<tr>
|
202
|
-
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
203
|
-
<td>The height the image should have or -1 to not constrain the height
|
204
|
-
</td>
|
205
|
-
</tr>
|
206
|
-
<tr>
|
207
|
-
<td><p><span class="term"><em class="parameter"><code>preserve_aspect_ratio</code></em> :</span></p></td>
|
208
|
-
<td>
|
209
|
-
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to preserve the image's aspect ratio
|
210
|
-
</td>
|
211
|
-
</tr>
|
212
|
-
<tr>
|
213
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
214
|
-
<td>Return location for an error
|
215
|
-
</td>
|
216
|
-
</tr>
|
217
|
-
<tr>
|
218
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
219
|
-
<td> A newly-created pixbuf with a reference 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>
|
220
|
-
if any of several error conditions occurred: the file could not be opened,
|
221
|
-
there was no loader for the file's format, there was not enough memory to
|
222
|
-
allocate the image buffer, or the image file contained invalid data.
|
223
|
-
|
224
|
-
</td>
|
225
|
-
</tr>
|
226
|
-
</tbody>
|
227
|
-
</table></div>
|
228
|
-
<p class="since">Since 2.6</p>
|
229
|
-
</div>
|
230
|
-
<hr>
|
231
|
-
<div class="refsect2" title="gdk_pixbuf_get_file_info ()">
|
232
|
-
<a name="gdk-pixbuf-get-file-info"></a><h3>gdk_pixbuf_get_file_info ()</h3>
|
233
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="GdkPixbufFormat"><span class="returnvalue">GdkPixbufFormat</span></a> * gdk_pixbuf_get_file_info (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
|
234
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *width</code></em>,
|
235
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *height</code></em>);</pre>
|
236
|
-
<p>
|
237
|
-
Parses an image file far enough to determine its format and size.
|
238
|
-
</p>
|
239
|
-
<div class="variablelist"><table border="0">
|
240
|
-
<col align="left" valign="top">
|
241
|
-
<tbody>
|
242
|
-
<tr>
|
243
|
-
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
|
244
|
-
<td>The name of the file to identify.
|
245
|
-
</td>
|
246
|
-
</tr>
|
247
|
-
<tr>
|
248
|
-
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
249
|
-
<td>Return location for the width of the image, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
|
250
|
-
</td>
|
251
|
-
</tr>
|
252
|
-
<tr>
|
253
|
-
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
254
|
-
<td>Return location for the height of the image, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
|
255
|
-
</td>
|
256
|
-
</tr>
|
257
|
-
<tr>
|
258
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
259
|
-
<td> A <a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="GdkPixbufFormat"><span class="type">GdkPixbufFormat</span></a> describing the image format of the file
|
260
|
-
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the image format wasn't recognized. The return value
|
261
|
-
is owned by GdkPixbuf and should not be freed.
|
262
|
-
|
263
|
-
</td>
|
264
|
-
</tr>
|
265
|
-
</tbody>
|
266
|
-
</table></div>
|
267
|
-
<p class="since">Since 2.4</p>
|
268
|
-
</div>
|
269
|
-
<hr>
|
270
|
-
<div class="refsect2" title="gdk_pixbuf_new_from_stream ()">
|
271
|
-
<a name="gdk-pixbuf-new-from-stream"></a><h3>gdk_pixbuf_new_from_stream ()</h3>
|
272
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_stream (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GInputStream.html"><span class="type">GInputStream</span></a> *stream</code></em>,
|
273
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
|
274
|
-
<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>
|
275
|
-
<p>
|
276
|
-
Creates a new pixbuf by loading an image from an input stream.
|
277
|
-
</p>
|
278
|
-
<p>
|
279
|
-
The file format is detected automatically. If <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned, then
|
280
|
-
<em class="parameter"><code>error</code></em> will be set. The <em class="parameter"><code>cancellable</code></em> can be used to abort the operation
|
281
|
-
from another thread. If the operation was cancelled, the error
|
282
|
-
<code class="literal">GIO_ERROR_CANCELLED</code> will be returned. Other possible errors are in
|
283
|
-
the <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a> and <a href="http://library.gnome.org/devel/gio/unstable/gio-GIOError.html#G-IO-ERROR:CAPS"><code class="literal">G_IO_ERROR</code></a> domains.
|
284
|
-
</p>
|
285
|
-
<p>
|
286
|
-
The stream is not closed.
|
287
|
-
</p>
|
288
|
-
<div class="variablelist"><table border="0">
|
289
|
-
<col align="left" valign="top">
|
290
|
-
<tbody>
|
291
|
-
<tr>
|
292
|
-
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
|
293
|
-
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GInputStream.html"><span class="type">GInputStream</span></a> to load the pixbuf from
|
294
|
-
</td>
|
295
|
-
</tr>
|
296
|
-
<tr>
|
297
|
-
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
|
298
|
-
<td>optional <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> object, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore
|
299
|
-
</td>
|
300
|
-
</tr>
|
301
|
-
<tr>
|
302
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
303
|
-
<td>Return location for an error
|
304
|
-
</td>
|
305
|
-
</tr>
|
306
|
-
<tr>
|
307
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
308
|
-
<td> A newly-created pixbuf, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if any of several error
|
309
|
-
conditions occurred: the file could not be opened, the image format is
|
310
|
-
not supported, there was not enough memory to allocate the image buffer,
|
311
|
-
the stream contained invalid data, or the operation was cancelled.
|
312
|
-
|
313
|
-
</td>
|
314
|
-
</tr>
|
315
|
-
</tbody>
|
316
|
-
</table></div>
|
317
|
-
<p class="since">Since 2.14</p>
|
318
|
-
</div>
|
319
|
-
<hr>
|
320
|
-
<div class="refsect2" title="gdk_pixbuf_new_from_stream_at_scale ()">
|
321
|
-
<a name="gdk-pixbuf-new-from-stream-at-scale"></a><h3>gdk_pixbuf_new_from_stream_at_scale ()</h3>
|
322
|
-
<pre class="programlisting"><a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_stream_at_scale (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GInputStream.html"><span class="type">GInputStream</span></a> *stream</code></em>,
|
323
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
|
324
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
|
325
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> preserve_aspect_ratio</code></em>,
|
326
|
-
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
|
327
|
-
<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>
|
328
|
-
<p>
|
329
|
-
Creates a new pixbuf by loading an image from an input stream.
|
330
|
-
</p>
|
331
|
-
<p>
|
332
|
-
The file format is detected automatically. If <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned, then
|
333
|
-
<em class="parameter"><code>error</code></em> will be set. The <em class="parameter"><code>cancellable</code></em> can be used to abort the operation
|
334
|
-
from another thread. If the operation was cancelled, the error
|
335
|
-
<code class="literal">GIO_ERROR_CANCELLED</code> will be returned. Other possible errors are in
|
336
|
-
the <a class="link" href="gdk-pixbuf-gdk-pixbuf.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a> and <a href="http://library.gnome.org/devel/gio/unstable/gio-GIOError.html#G-IO-ERROR:CAPS"><code class="literal">G_IO_ERROR</code></a> domains.
|
337
|
-
</p>
|
338
|
-
<p>
|
339
|
-
The image will be scaled to fit in the requested size, optionally
|
340
|
-
preserving the image's aspect ratio. When preserving the aspect ratio,
|
341
|
-
a <em class="parameter"><code>width</code></em> of -1 will cause the image to be scaled to the exact given
|
342
|
-
height, and a <em class="parameter"><code>height</code></em> of -1 will cause the image to be scaled to the
|
343
|
-
exact given width. When not preserving aspect ratio, a <em class="parameter"><code>width</code></em> or
|
344
|
-
<em class="parameter"><code>height</code></em> of -1 means to not scale the image at all in that dimension.
|
345
|
-
</p>
|
346
|
-
<p>
|
347
|
-
The stream is not closed.
|
348
|
-
</p>
|
349
|
-
<div class="variablelist"><table border="0">
|
350
|
-
<col align="left" valign="top">
|
351
|
-
<tbody>
|
352
|
-
<tr>
|
353
|
-
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
|
354
|
-
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GInputStream.html"><span class="type">GInputStream</span></a> to load the pixbuf from
|
355
|
-
</td>
|
356
|
-
</tr>
|
357
|
-
<tr>
|
358
|
-
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
359
|
-
<td>The width the image should have or -1 to not constrain the width
|
360
|
-
</td>
|
361
|
-
</tr>
|
362
|
-
<tr>
|
363
|
-
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
364
|
-
<td>The height the image should have or -1 to not constrain the height
|
365
|
-
</td>
|
366
|
-
</tr>
|
367
|
-
<tr>
|
368
|
-
<td><p><span class="term"><em class="parameter"><code>preserve_aspect_ratio</code></em> :</span></p></td>
|
369
|
-
<td>
|
370
|
-
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to preserve the image's aspect ratio
|
371
|
-
</td>
|
372
|
-
</tr>
|
373
|
-
<tr>
|
374
|
-
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
|
375
|
-
<td>optional <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> object, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore
|
376
|
-
</td>
|
377
|
-
</tr>
|
378
|
-
<tr>
|
379
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
380
|
-
<td>Return location for an error
|
381
|
-
</td>
|
382
|
-
</tr>
|
383
|
-
<tr>
|
384
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
385
|
-
<td> A newly-created pixbuf, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if any of several error
|
386
|
-
conditions occurred: the file could not be opened, the image format is
|
387
|
-
not supported, there was not enough memory to allocate the image buffer,
|
388
|
-
the stream contained invalid data, or the operation was cancelled.
|
389
|
-
|
390
|
-
</td>
|
391
|
-
</tr>
|
392
|
-
</tbody>
|
393
|
-
</table></div>
|
394
|
-
<p class="since">Since 2.14</p>
|
395
|
-
</div>
|
396
|
-
</div>
|
397
|
-
</div>
|
398
|
-
<div class="footer">
|
399
|
-
<hr>
|
400
|
-
Generated by GTK-Doc V1.15</div>
|
401
|
-
</body>
|
402
|
-
</html>
|