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
@@ -0,0 +1,372 @@
|
|
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-Reference-Counting-and-Memory-Mangement.html" title="Reference Counting and Memory Mangement">
|
10
|
+
<link rel="next" href="gdk-pixbuf-File-saving.html" title="File saving">
|
11
|
+
<meta name="generator" content="GTK-Doc V1.17.1 (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-Reference-Counting-and-Memory-Mangement.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">
|
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 — Loading a pixbuf from a file.</p>
|
35
|
+
</td>
|
36
|
+
<td valign="top" align="right"></td>
|
37
|
+
</tr></table></div>
|
38
|
+
<div class="refsynopsisdiv">
|
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
|
+
#define <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>
|
44
|
+
#define <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>
|
45
|
+
#define <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>
|
46
|
+
<a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="struct 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 <span class="type">gchar</span> *filename</code></em>,
|
47
|
+
<em class="parameter"><code><span class="type">gint</span> *width</code></em>,
|
48
|
+
<em class="parameter"><code><span class="type">gint</span> *height</code></em>);
|
49
|
+
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.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><span class="type">GInputStream</span> *stream</code></em>,
|
50
|
+
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
51
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
|
52
|
+
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.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><span class="type">GInputStream</span> *stream</code></em>,
|
53
|
+
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
|
54
|
+
<em class="parameter"><code><span class="type">gint</span> height</code></em>,
|
55
|
+
<em class="parameter"><code><span class="type">gboolean</span> preserve_aspect_ratio</code></em>,
|
56
|
+
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
57
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
|
58
|
+
</pre>
|
59
|
+
</div>
|
60
|
+
<div class="refsect1">
|
61
|
+
<a name="gdk-pixbuf-File-Loading.description"></a><h2>Description</h2>
|
62
|
+
<p>
|
63
|
+
The &gdk-pixbuf; library provides a simple mechanism for loading
|
64
|
+
an image from a file in synchronous fashion. This means that the
|
65
|
+
library takes control of the application while the file is being
|
66
|
+
loaded; from the user's point of view, the application will block
|
67
|
+
until the image is done loading.
|
68
|
+
</p>
|
69
|
+
<p>
|
70
|
+
This interface can be used by applications in which blocking is
|
71
|
+
acceptable while an image is being loaded. It can also be used to
|
72
|
+
load small images in general. Applications that need progressive
|
73
|
+
loading can use the <a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a> functionality instead.
|
74
|
+
</p>
|
75
|
+
</div>
|
76
|
+
<div class="refsect1">
|
77
|
+
<a name="gdk-pixbuf-File-Loading.details"></a><h2>Details</h2>
|
78
|
+
<div class="refsect2">
|
79
|
+
<a name="gdk-pixbuf-new-from-file"></a><h3>gdk_pixbuf_new_from_file</h3>
|
80
|
+
<pre class="programlisting">#define gdk_pixbuf_new_from_file gdk_pixbuf_new_from_file_utf8
|
81
|
+
</pre>
|
82
|
+
<p>
|
83
|
+
Creates a new pixbuf by loading an image from a file. The file format is
|
84
|
+
detected automatically. If <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> is returned, then <em class="parameter"><code>error</code></em> will be set.
|
85
|
+
Possible errors are in the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a> and <span class="type">G_FILE_ERROR</span> domains.
|
86
|
+
</p>
|
87
|
+
<div class="variablelist"><table border="0">
|
88
|
+
<col align="left" valign="top">
|
89
|
+
<tbody>
|
90
|
+
<tr>
|
91
|
+
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
|
92
|
+
<td>Name of file to load, in the GLib file name encoding</td>
|
93
|
+
</tr>
|
94
|
+
<tr>
|
95
|
+
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
96
|
+
<td>Return location for an error</td>
|
97
|
+
</tr>
|
98
|
+
<tr>
|
99
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
100
|
+
<td>A newly-created pixbuf with a reference count of 1, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if
|
101
|
+
any of several error conditions occurred: the file could not be opened,
|
102
|
+
there was no loader for the file's format, there was not enough memory to
|
103
|
+
allocate the image buffer, or the image file contained invalid data.</td>
|
104
|
+
</tr>
|
105
|
+
</tbody>
|
106
|
+
</table></div>
|
107
|
+
</div>
|
108
|
+
<hr>
|
109
|
+
<div class="refsect2">
|
110
|
+
<a name="gdk-pixbuf-new-from-file-at-size"></a><h3>gdk_pixbuf_new_from_file_at_size</h3>
|
111
|
+
<pre class="programlisting">#define gdk_pixbuf_new_from_file_at_size gdk_pixbuf_new_from_file_at_size_utf8
|
112
|
+
</pre>
|
113
|
+
<p>
|
114
|
+
Creates a new pixbuf by loading an image from a file.
|
115
|
+
The file format is detected automatically. If <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> is returned, then
|
116
|
+
<em class="parameter"><code>error</code></em> will be set. Possible errors are in the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a> and
|
117
|
+
<span class="type">G_FILE_ERROR</span> domains.
|
118
|
+
</p>
|
119
|
+
<p>
|
120
|
+
The image will be scaled to fit in the requested size, preserving
|
121
|
+
the image's aspect ratio. Note that the returned pixbuf may be smaller
|
122
|
+
than <em class="parameter"><code>width</code></em> x <em class="parameter"><code>height</code></em>, if the aspect ratio requires it. To load
|
123
|
+
and image at the requested size, regardless of aspect ratio, use
|
124
|
+
<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>.
|
125
|
+
</p>
|
126
|
+
<div class="variablelist"><table border="0">
|
127
|
+
<col align="left" valign="top">
|
128
|
+
<tbody>
|
129
|
+
<tr>
|
130
|
+
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
|
131
|
+
<td>Name of file to load, in the GLib file name encoding</td>
|
132
|
+
</tr>
|
133
|
+
<tr>
|
134
|
+
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
135
|
+
<td>The width the image should have or -1 to not constrain the width</td>
|
136
|
+
</tr>
|
137
|
+
<tr>
|
138
|
+
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
139
|
+
<td>The height the image should have or -1 to not constrain the height</td>
|
140
|
+
</tr>
|
141
|
+
<tr>
|
142
|
+
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
143
|
+
<td>Return location for an error</td>
|
144
|
+
</tr>
|
145
|
+
<tr>
|
146
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
147
|
+
<td>A newly-created pixbuf with a reference count of 1, or
|
148
|
+
<a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if any of several error conditions occurred: the file could not
|
149
|
+
be opened, there was no loader for the file's format, there was not
|
150
|
+
enough memory to allocate the image buffer, or the image file contained
|
151
|
+
invalid data.</td>
|
152
|
+
</tr>
|
153
|
+
</tbody>
|
154
|
+
</table></div>
|
155
|
+
<p class="since">Since 2.4</p>
|
156
|
+
</div>
|
157
|
+
<hr>
|
158
|
+
<div class="refsect2">
|
159
|
+
<a name="gdk-pixbuf-new-from-file-at-scale"></a><h3>gdk_pixbuf_new_from_file_at_scale</h3>
|
160
|
+
<pre class="programlisting">#define gdk_pixbuf_new_from_file_at_scale gdk_pixbuf_new_from_file_at_scale_utf8
|
161
|
+
</pre>
|
162
|
+
<p>
|
163
|
+
Creates a new pixbuf by loading an image from a file. The file format is
|
164
|
+
detected automatically. If <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> is returned, then <em class="parameter"><code>error</code></em> will be set.
|
165
|
+
Possible errors are in the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a> and <span class="type">G_FILE_ERROR</span> domains.
|
166
|
+
The image will be scaled to fit in the requested size, optionally preserving
|
167
|
+
the image's aspect ratio.
|
168
|
+
</p>
|
169
|
+
<p>
|
170
|
+
When preserving the aspect ratio, a <em class="parameter"><code>width</code></em> of -1 will cause the image
|
171
|
+
to be scaled to the exact given height, and a <em class="parameter"><code>height</code></em> of -1 will cause
|
172
|
+
the image to be scaled to the exact given width. When not preserving
|
173
|
+
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
|
174
|
+
at all in that dimension. Negative values for <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> are
|
175
|
+
allowed since 2.8.
|
176
|
+
</p>
|
177
|
+
<div class="variablelist"><table border="0">
|
178
|
+
<col align="left" valign="top">
|
179
|
+
<tbody>
|
180
|
+
<tr>
|
181
|
+
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
|
182
|
+
<td>Name of file to load, in the GLib file name encoding</td>
|
183
|
+
</tr>
|
184
|
+
<tr>
|
185
|
+
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
186
|
+
<td>The width the image should have or -1 to not constrain the width</td>
|
187
|
+
</tr>
|
188
|
+
<tr>
|
189
|
+
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
190
|
+
<td>The height the image should have or -1 to not constrain the height</td>
|
191
|
+
</tr>
|
192
|
+
<tr>
|
193
|
+
<td><p><span class="term"><em class="parameter"><code>preserve_aspect_ratio</code></em> :</span></p></td>
|
194
|
+
<td>
|
195
|
+
<code class="literal">TRUE</code> to preserve the image's aspect ratio</td>
|
196
|
+
</tr>
|
197
|
+
<tr>
|
198
|
+
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
199
|
+
<td>Return location for an error</td>
|
200
|
+
</tr>
|
201
|
+
<tr>
|
202
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
203
|
+
<td>A newly-created pixbuf with a reference count of 1, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
|
204
|
+
if any of several error conditions occurred: the file could not be opened,
|
205
|
+
there was no loader for the file's format, there was not enough memory to
|
206
|
+
allocate the image buffer, or the image file contained invalid data.</td>
|
207
|
+
</tr>
|
208
|
+
</tbody>
|
209
|
+
</table></div>
|
210
|
+
<p class="since">Since 2.6</p>
|
211
|
+
</div>
|
212
|
+
<hr>
|
213
|
+
<div class="refsect2">
|
214
|
+
<a name="gdk-pixbuf-get-file-info"></a><h3>gdk_pixbuf_get_file_info ()</h3>
|
215
|
+
<pre class="programlisting"><a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="struct GdkPixbufFormat"><span class="returnvalue">GdkPixbufFormat</span></a> * gdk_pixbuf_get_file_info (<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>,
|
216
|
+
<em class="parameter"><code><span class="type">gint</span> *width</code></em>,
|
217
|
+
<em class="parameter"><code><span class="type">gint</span> *height</code></em>);</pre>
|
218
|
+
<p>
|
219
|
+
Parses an image file far enough to determine its format and size.
|
220
|
+
</p>
|
221
|
+
<div class="variablelist"><table border="0">
|
222
|
+
<col align="left" valign="top">
|
223
|
+
<tbody>
|
224
|
+
<tr>
|
225
|
+
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
|
226
|
+
<td>The name of the file to identify.</td>
|
227
|
+
</tr>
|
228
|
+
<tr>
|
229
|
+
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
230
|
+
<td>Return location for the width of the image, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
|
231
|
+
</td>
|
232
|
+
</tr>
|
233
|
+
<tr>
|
234
|
+
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
235
|
+
<td>Return location for the height of the image, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
|
236
|
+
</td>
|
237
|
+
</tr>
|
238
|
+
<tr>
|
239
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
240
|
+
<td>A <a class="link" href="gdk-pixbuf-Module-Interface.html#GdkPixbufFormat" title="struct GdkPixbufFormat"><span class="type">GdkPixbufFormat</span></a> describing the image format of the file
|
241
|
+
or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if the image format wasn't recognized. The return value
|
242
|
+
is owned by GdkPixbuf and should not be freed.</td>
|
243
|
+
</tr>
|
244
|
+
</tbody>
|
245
|
+
</table></div>
|
246
|
+
<p class="since">Since 2.4</p>
|
247
|
+
</div>
|
248
|
+
<hr>
|
249
|
+
<div class="refsect2">
|
250
|
+
<a name="gdk-pixbuf-new-from-stream"></a><h3>gdk_pixbuf_new_from_stream ()</h3>
|
251
|
+
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_stream (<em class="parameter"><code><span class="type">GInputStream</span> *stream</code></em>,
|
252
|
+
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
253
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
254
|
+
<p>
|
255
|
+
Creates a new pixbuf by loading an image from an input stream.
|
256
|
+
</p>
|
257
|
+
<p>
|
258
|
+
The file format is detected automatically. If <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> is returned, then
|
259
|
+
<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
|
260
|
+
from another thread. If the operation was cancelled, the error
|
261
|
+
<code class="literal">GIO_ERROR_CANCELLED</code> will be returned. Other possible errors are in
|
262
|
+
the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a> and <code class="literal">G_IO_ERROR</code> domains.
|
263
|
+
</p>
|
264
|
+
<p>
|
265
|
+
The stream is not closed.
|
266
|
+
</p>
|
267
|
+
<div class="variablelist"><table border="0">
|
268
|
+
<col align="left" valign="top">
|
269
|
+
<tbody>
|
270
|
+
<tr>
|
271
|
+
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
|
272
|
+
<td>a <span class="type">GInputStream</span> to load the pixbuf from</td>
|
273
|
+
</tr>
|
274
|
+
<tr>
|
275
|
+
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
|
276
|
+
<td>optional <span class="type">GCancellable</span> object, <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> to ignore</td>
|
277
|
+
</tr>
|
278
|
+
<tr>
|
279
|
+
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
280
|
+
<td>Return location for an error</td>
|
281
|
+
</tr>
|
282
|
+
<tr>
|
283
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
284
|
+
<td>A newly-created pixbuf, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if any of several error
|
285
|
+
conditions occurred: the file could not be opened, the image format is
|
286
|
+
not supported, there was not enough memory to allocate the image buffer,
|
287
|
+
the stream contained invalid data, or the operation was cancelled.</td>
|
288
|
+
</tr>
|
289
|
+
</tbody>
|
290
|
+
</table></div>
|
291
|
+
<p class="since">Since 2.14</p>
|
292
|
+
</div>
|
293
|
+
<hr>
|
294
|
+
<div class="refsect2">
|
295
|
+
<a name="gdk-pixbuf-new-from-stream-at-scale"></a><h3>gdk_pixbuf_new_from_stream_at_scale ()</h3>
|
296
|
+
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_stream_at_scale (<em class="parameter"><code><span class="type">GInputStream</span> *stream</code></em>,
|
297
|
+
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
|
298
|
+
<em class="parameter"><code><span class="type">gint</span> height</code></em>,
|
299
|
+
<em class="parameter"><code><span class="type">gboolean</span> preserve_aspect_ratio</code></em>,
|
300
|
+
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
301
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
302
|
+
<p>
|
303
|
+
Creates a new pixbuf by loading an image from an input stream.
|
304
|
+
</p>
|
305
|
+
<p>
|
306
|
+
The file format is detected automatically. If <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> is returned, then
|
307
|
+
<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
|
308
|
+
from another thread. If the operation was cancelled, the error
|
309
|
+
<code class="literal">GIO_ERROR_CANCELLED</code> will be returned. Other possible errors are in
|
310
|
+
the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a> and <code class="literal">G_IO_ERROR</code> domains.
|
311
|
+
</p>
|
312
|
+
<p>
|
313
|
+
The image will be scaled to fit in the requested size, optionally
|
314
|
+
preserving the image's aspect ratio. When preserving the aspect ratio,
|
315
|
+
a <em class="parameter"><code>width</code></em> of -1 will cause the image to be scaled to the exact given
|
316
|
+
height, and a <em class="parameter"><code>height</code></em> of -1 will cause the image to be scaled to the
|
317
|
+
exact given width. When not preserving aspect ratio, a <em class="parameter"><code>width</code></em> or
|
318
|
+
<em class="parameter"><code>height</code></em> of -1 means to not scale the image at all in that dimension.
|
319
|
+
</p>
|
320
|
+
<p>
|
321
|
+
The stream is not closed.
|
322
|
+
</p>
|
323
|
+
<div class="variablelist"><table border="0">
|
324
|
+
<col align="left" valign="top">
|
325
|
+
<tbody>
|
326
|
+
<tr>
|
327
|
+
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
|
328
|
+
<td>a <span class="type">GInputStream</span> to load the pixbuf from</td>
|
329
|
+
</tr>
|
330
|
+
<tr>
|
331
|
+
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
332
|
+
<td>The width the image should have or -1 to not constrain the width</td>
|
333
|
+
</tr>
|
334
|
+
<tr>
|
335
|
+
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
336
|
+
<td>The height the image should have or -1 to not constrain the height</td>
|
337
|
+
</tr>
|
338
|
+
<tr>
|
339
|
+
<td><p><span class="term"><em class="parameter"><code>preserve_aspect_ratio</code></em> :</span></p></td>
|
340
|
+
<td>
|
341
|
+
<code class="literal">TRUE</code> to preserve the image's aspect ratio</td>
|
342
|
+
</tr>
|
343
|
+
<tr>
|
344
|
+
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
|
345
|
+
<td>optional <span class="type">GCancellable</span> object, <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> to ignore</td>
|
346
|
+
</tr>
|
347
|
+
<tr>
|
348
|
+
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
349
|
+
<td>Return location for an error</td>
|
350
|
+
</tr>
|
351
|
+
<tr>
|
352
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
353
|
+
<td>A newly-created pixbuf, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if any of several error
|
354
|
+
conditions occurred: the file could not be opened, the image format is
|
355
|
+
not supported, there was not enough memory to allocate the image buffer,
|
356
|
+
the stream contained invalid data, or the operation was cancelled.</td>
|
357
|
+
</tr>
|
358
|
+
</tbody>
|
359
|
+
</table></div>
|
360
|
+
<p class="since">Since 2.14</p>
|
361
|
+
</div>
|
362
|
+
</div>
|
363
|
+
<div class="refsect1">
|
364
|
+
<a name="gdk-pixbuf-File-Loading.see-also"></a><h2>See Also</h2>
|
365
|
+
<a class="link" href="GdkPixbufLoader.html" title="GdkPixbufLoader"><span class="type">GdkPixbufLoader</span></a>.
|
366
|
+
</div>
|
367
|
+
</div>
|
368
|
+
<div class="footer">
|
369
|
+
<hr>
|
370
|
+
Generated by GTK-Doc V1.17.1</div>
|
371
|
+
</body>
|
372
|
+
</html>
|
@@ -0,0 +1,642 @@
|
|
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 saving</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-Loading.html" title="File Loading">
|
10
|
+
<link rel="next" href="gdk-pixbuf-Image-Data-in-Memory.html" title="Image Data in Memory">
|
11
|
+
<meta name="generator" content="GTK-Doc V1.17.1 (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-Loading.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-Image-Data-in-Memory.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-saving.synopsis" class="shortcut">Top</a>
|
25
|
+
|
|
26
|
+
<a href="#gdk-pixbuf-File-saving.description" class="shortcut">Description</a>
|
27
|
+
</td></tr>
|
28
|
+
</table>
|
29
|
+
<div class="refentry">
|
30
|
+
<a name="gdk-pixbuf-File-saving"></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-saving.top_of_page"></a>File saving</span></h2>
|
34
|
+
<p>File saving — Saving a pixbuf to a file.</p>
|
35
|
+
</td>
|
36
|
+
<td valign="top" align="right"></td>
|
37
|
+
</tr></table></div>
|
38
|
+
<div class="refsynopsisdiv">
|
39
|
+
<a name="gdk-pixbuf-File-saving.synopsis"></a><h2>Synopsis</h2>
|
40
|
+
<pre class="synopsis">
|
41
|
+
#include <gdk-pixbuf/gdk-pixbuf.h>
|
42
|
+
|
43
|
+
#define <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-savev" title="gdk_pixbuf_savev">gdk_pixbuf_savev</a>
|
44
|
+
#define <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save" title="gdk_pixbuf_save">gdk_pixbuf_save</a>
|
45
|
+
<span class="returnvalue">gboolean</span> (<a class="link" href="gdk-pixbuf-File-saving.html#GdkPixbufSaveFunc" title="GdkPixbufSaveFunc ()">*GdkPixbufSaveFunc</a>) (<em class="parameter"><code>const <span class="type">gchar</span> *buf</code></em>,
|
46
|
+
<em class="parameter"><code><span class="type">gsize</span> count</code></em>,
|
47
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>,
|
48
|
+
<em class="parameter"><code><span class="type">gpointer</span> data</code></em>);
|
49
|
+
<span class="returnvalue">gboolean</span> <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save-to-callback" title="gdk_pixbuf_save_to_callback ()">gdk_pixbuf_save_to_callback</a> (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
|
50
|
+
<em class="parameter"><code><a class="link" href="gdk-pixbuf-File-saving.html#GdkPixbufSaveFunc" title="GdkPixbufSaveFunc ()"><span class="type">GdkPixbufSaveFunc</span></a> save_func</code></em>,
|
51
|
+
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
|
52
|
+
<em class="parameter"><code>const <span class="type">char</span> *type</code></em>,
|
53
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>,
|
54
|
+
<em class="parameter"><code>...</code></em>);
|
55
|
+
<span class="returnvalue">gboolean</span> <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save-to-callbackv" title="gdk_pixbuf_save_to_callbackv ()">gdk_pixbuf_save_to_callbackv</a> (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
|
56
|
+
<em class="parameter"><code><a class="link" href="gdk-pixbuf-File-saving.html#GdkPixbufSaveFunc" title="GdkPixbufSaveFunc ()"><span class="type">GdkPixbufSaveFunc</span></a> save_func</code></em>,
|
57
|
+
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
|
58
|
+
<em class="parameter"><code>const <span class="type">char</span> *type</code></em>,
|
59
|
+
<em class="parameter"><code><span class="type">char</span> **option_keys</code></em>,
|
60
|
+
<em class="parameter"><code><span class="type">char</span> **option_values</code></em>,
|
61
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
|
62
|
+
<span class="returnvalue">gboolean</span> <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save-to-buffer" title="gdk_pixbuf_save_to_buffer ()">gdk_pixbuf_save_to_buffer</a> (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
|
63
|
+
<em class="parameter"><code><span class="type">gchar</span> **buffer</code></em>,
|
64
|
+
<em class="parameter"><code><span class="type">gsize</span> *buffer_size</code></em>,
|
65
|
+
<em class="parameter"><code>const <span class="type">char</span> *type</code></em>,
|
66
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>,
|
67
|
+
<em class="parameter"><code>...</code></em>);
|
68
|
+
<span class="returnvalue">gboolean</span> <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save-to-bufferv" title="gdk_pixbuf_save_to_bufferv ()">gdk_pixbuf_save_to_bufferv</a> (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
|
69
|
+
<em class="parameter"><code><span class="type">gchar</span> **buffer</code></em>,
|
70
|
+
<em class="parameter"><code><span class="type">gsize</span> *buffer_size</code></em>,
|
71
|
+
<em class="parameter"><code>const <span class="type">char</span> *type</code></em>,
|
72
|
+
<em class="parameter"><code><span class="type">char</span> **option_keys</code></em>,
|
73
|
+
<em class="parameter"><code><span class="type">char</span> **option_values</code></em>,
|
74
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
|
75
|
+
<span class="returnvalue">gboolean</span> <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save-to-stream" title="gdk_pixbuf_save_to_stream ()">gdk_pixbuf_save_to_stream</a> (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
|
76
|
+
<em class="parameter"><code><span class="type">GOutputStream</span> *stream</code></em>,
|
77
|
+
<em class="parameter"><code>const <span class="type">char</span> *type</code></em>,
|
78
|
+
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
79
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>,
|
80
|
+
<em class="parameter"><code>...</code></em>);
|
81
|
+
</pre>
|
82
|
+
</div>
|
83
|
+
<div class="refsect1">
|
84
|
+
<a name="gdk-pixbuf-File-saving.description"></a><h2>Description</h2>
|
85
|
+
<p>
|
86
|
+
These functions allow to save a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> in a number of
|
87
|
+
file formats. The formatted data can be written to a file
|
88
|
+
or to a memory buffer. &gdk-pixbuf; can also call a user-defined
|
89
|
+
callback on the data, which allows to e.g. write the image
|
90
|
+
to a socket or store it in a database.
|
91
|
+
</p>
|
92
|
+
</div>
|
93
|
+
<div class="refsect1">
|
94
|
+
<a name="gdk-pixbuf-File-saving.details"></a><h2>Details</h2>
|
95
|
+
<div class="refsect2">
|
96
|
+
<a name="gdk-pixbuf-savev"></a><h3>gdk_pixbuf_savev</h3>
|
97
|
+
<pre class="programlisting">#define gdk_pixbuf_savev gdk_pixbuf_savev_utf8
|
98
|
+
</pre>
|
99
|
+
<p>
|
100
|
+
Saves pixbuf to a file in <em class="parameter"><code>type</code></em>, which is currently "jpeg", "png", "tiff", "ico" or "bmp".
|
101
|
+
If <em class="parameter"><code>error</code></em> is set, <code class="literal">FALSE</code> will be returned.
|
102
|
+
See <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save" title="gdk_pixbuf_save"><code class="function">gdk_pixbuf_save()</code></a> for more details.
|
103
|
+
</p>
|
104
|
+
<div class="variablelist"><table border="0">
|
105
|
+
<col align="left" valign="top">
|
106
|
+
<tbody>
|
107
|
+
<tr>
|
108
|
+
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
|
109
|
+
<td>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
|
110
|
+
</tr>
|
111
|
+
<tr>
|
112
|
+
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
|
113
|
+
<td>name of file to save.</td>
|
114
|
+
</tr>
|
115
|
+
<tr>
|
116
|
+
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
|
117
|
+
<td>name of file format.</td>
|
118
|
+
</tr>
|
119
|
+
<tr>
|
120
|
+
<td><p><span class="term"><em class="parameter"><code>option_keys</code></em> :</span></p></td>
|
121
|
+
<td>name of options to set, <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>-terminated. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span>
|
122
|
+
</td>
|
123
|
+
</tr>
|
124
|
+
<tr>
|
125
|
+
<td><p><span class="term"><em class="parameter"><code>option_values</code></em> :</span></p></td>
|
126
|
+
<td>values for named options. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span>
|
127
|
+
</td>
|
128
|
+
</tr>
|
129
|
+
<tr>
|
130
|
+
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
131
|
+
<td>return location for error, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
132
|
+
</td>
|
133
|
+
</tr>
|
134
|
+
<tr>
|
135
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
136
|
+
<td>whether an error was set</td>
|
137
|
+
</tr>
|
138
|
+
</tbody>
|
139
|
+
</table></div>
|
140
|
+
</div>
|
141
|
+
<hr>
|
142
|
+
<div class="refsect2">
|
143
|
+
<a name="gdk-pixbuf-save"></a><h3>gdk_pixbuf_save</h3>
|
144
|
+
<pre class="programlisting">#define gdk_pixbuf_save gdk_pixbuf_save_utf8
|
145
|
+
</pre>
|
146
|
+
<p>
|
147
|
+
Saves pixbuf to a file in format <em class="parameter"><code>type</code></em>. By default, "jpeg", "png", "ico"
|
148
|
+
and "bmp" are possible file formats to save in, but more formats may be
|
149
|
+
installed. The list of all writable formats can be determined in the
|
150
|
+
following way:
|
151
|
+
</p>
|
152
|
+
<p>
|
153
|
+
</p>
|
154
|
+
<div class="informalexample">
|
155
|
+
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
156
|
+
<tbody>
|
157
|
+
<tr>
|
158
|
+
<td class="listing_lines" align="right"><pre>1
|
159
|
+
2
|
160
|
+
3
|
161
|
+
4
|
162
|
+
5
|
163
|
+
6
|
164
|
+
7
|
165
|
+
8
|
166
|
+
9
|
167
|
+
10</pre></td>
|
168
|
+
<td class="listing_code"><pre class="programlisting"><span class="type">void</span><span class="normal"> </span><span class="function">add_if_writable</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GdkPixbufFormat</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">data</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">GSList</span><span class="normal"> </span><span class="symbol">**</span><span class="normal">list</span><span class="symbol">)</span>
|
169
|
+
<span class="cbracket">{</span>
|
170
|
+
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="gdk-pixbuf-Module-Interface.html#gdk-pixbuf-format-is-writable">gdk_pixbuf_format_is_writable</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">data</span><span class="symbol">))</span>
|
171
|
+
<span class="normal"> </span><span class="symbol">*</span><span class="normal">list </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_slist_prepend</span><span class="normal"> </span><span class="symbol">(*</span><span class="normal">list</span><span class="symbol">,</span><span class="normal"> data</span><span class="symbol">);</span>
|
172
|
+
<span class="cbracket">}</span>
|
173
|
+
|
174
|
+
<span class="usertype">GSList</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">formats </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gdk-pixbuf-Module-Interface.html#gdk-pixbuf-get-formats">gdk_pixbuf_get_formats</a></span><span class="normal"> </span><span class="symbol">();</span>
|
175
|
+
<span class="usertype">GSList</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">writable_formats </span><span class="symbol">=</span><span class="normal"> <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS">NULL</a></span><span class="symbol">;</span>
|
176
|
+
<span class="function">g_slist_foreach</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">formats</span><span class="symbol">,</span><span class="normal"> add_if_writable</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">writable_formats</span><span class="symbol">);</span>
|
177
|
+
<span class="function">g_slist_free</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">formats</span><span class="symbol">);</span></pre></td>
|
178
|
+
</tr>
|
179
|
+
</tbody>
|
180
|
+
</table>
|
181
|
+
</div>
|
182
|
+
|
183
|
+
<p>
|
184
|
+
</p>
|
185
|
+
<p>
|
186
|
+
If <em class="parameter"><code>error</code></em> is set, <code class="literal">FALSE</code> will be returned. Possible errors include
|
187
|
+
those in the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a> domain and those in the <span class="type">G_FILE_ERROR</span> domain.
|
188
|
+
</p>
|
189
|
+
<p>
|
190
|
+
The variable argument list should be <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>-terminated; if not empty,
|
191
|
+
it should contain pairs of strings that modify the save
|
192
|
+
parameters. For example:
|
193
|
+
</p>
|
194
|
+
<div class="informalexample">
|
195
|
+
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
196
|
+
<tbody>
|
197
|
+
<tr>
|
198
|
+
<td class="listing_lines" align="right"><pre>1
|
199
|
+
2</pre></td>
|
200
|
+
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save">gdk_pixbuf_save</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">pixbuf</span><span class="symbol">,</span><span class="normal"> handle</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"jpeg"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">error</span><span class="symbol">,</span>
|
201
|
+
<span class="normal"> </span><span class="string">"quality"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"100"</span><span class="symbol">,</span><span class="normal"> <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS">NULL</a></span><span class="symbol">);</span></pre></td>
|
202
|
+
</tr>
|
203
|
+
</tbody>
|
204
|
+
</table>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<p>
|
208
|
+
</p>
|
209
|
+
<p>
|
210
|
+
Currently only few parameters exist. JPEG images can be saved with a
|
211
|
+
"quality" parameter; its value should be in the range [0,100].
|
212
|
+
</p>
|
213
|
+
<p>
|
214
|
+
Text chunks can be attached to PNG images by specifying parameters of
|
215
|
+
the form "tEXt::key", where key is an ASCII string of length 1-79.
|
216
|
+
The values are UTF-8 encoded strings. The PNG compression level can
|
217
|
+
be specified using the "compression" parameter; it's value is in an
|
218
|
+
integer in the range of [0,9].
|
219
|
+
</p>
|
220
|
+
<p>
|
221
|
+
ICC color profiles can also be embedded into PNG and TIFF images.
|
222
|
+
The "icc-profile" value should be the complete ICC profile encoded
|
223
|
+
into base64.
|
224
|
+
</p>
|
225
|
+
<p>
|
226
|
+
</p>
|
227
|
+
<div class="informalexample">
|
228
|
+
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
229
|
+
<tbody>
|
230
|
+
<tr>
|
231
|
+
<td class="listing_lines" align="right"><pre>1
|
232
|
+
2
|
233
|
+
3
|
234
|
+
4
|
235
|
+
5
|
236
|
+
6
|
237
|
+
7
|
238
|
+
8</pre></td>
|
239
|
+
<td class="listing_code"><pre class="programlisting"><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">contents</span><span class="symbol">;</span>
|
240
|
+
<span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">contents_encode</span><span class="symbol">;</span>
|
241
|
+
<span class="usertype">gsize</span><span class="normal"> length</span><span class="symbol">;</span>
|
242
|
+
<span class="function">g_file_get_contents</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"/home/hughsie/.color/icc/L225W.icm"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">contents</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">length</span><span class="symbol">,</span><span class="normal"> <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS">NULL</a></span><span class="symbol">);</span>
|
243
|
+
<span class="normal">contents_encode </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_base64_encode</span><span class="normal"> </span><span class="symbol">((</span><span class="keyword">const</span><span class="normal"> guchar </span><span class="symbol">*)</span><span class="normal"> contents</span><span class="symbol">,</span><span class="normal"> length</span><span class="symbol">);</span>
|
244
|
+
<span class="function"><a href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save">gdk_pixbuf_save</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">pixbuf</span><span class="symbol">,</span><span class="normal"> handle</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"png"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">error</span><span class="symbol">,</span>
|
245
|
+
<span class="normal"> </span><span class="string">"icc-profile"</span><span class="symbol">,</span><span class="normal"> contents_encode</span><span class="symbol">,</span>
|
246
|
+
<span class="normal"> <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS">NULL</a></span><span class="symbol">);</span></pre></td>
|
247
|
+
</tr>
|
248
|
+
</tbody>
|
249
|
+
</table>
|
250
|
+
</div>
|
251
|
+
|
252
|
+
<p>
|
253
|
+
</p>
|
254
|
+
<p>
|
255
|
+
TIFF images recognize a "compression" option which acceps an integer value.
|
256
|
+
Among the codecs are 1 None, 2 Huffman, 5 LZW, 7 JPEG and 8 Deflate, see
|
257
|
+
the libtiff documentation and tiff.h for all supported codec values.
|
258
|
+
</p>
|
259
|
+
<p>
|
260
|
+
ICO images can be saved in depth 16, 24, or 32, by using the "depth"
|
261
|
+
parameter. When the ICO saver is given "x_hot" and "y_hot" parameters,
|
262
|
+
it produces a CUR instead of an ICO.
|
263
|
+
</p>
|
264
|
+
<div class="variablelist"><table border="0">
|
265
|
+
<col align="left" valign="top">
|
266
|
+
<tbody>
|
267
|
+
<tr>
|
268
|
+
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
|
269
|
+
<td>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
|
270
|
+
</tr>
|
271
|
+
<tr>
|
272
|
+
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
|
273
|
+
<td>name of file to save.</td>
|
274
|
+
</tr>
|
275
|
+
<tr>
|
276
|
+
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
|
277
|
+
<td>name of file format.</td>
|
278
|
+
</tr>
|
279
|
+
<tr>
|
280
|
+
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
281
|
+
<td>return location for error, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
282
|
+
</td>
|
283
|
+
</tr>
|
284
|
+
<tr>
|
285
|
+
<td><p><span class="term"><em class="parameter"><code>Varargs</code></em> :</span></p></td>
|
286
|
+
<td>list of key-value save options</td>
|
287
|
+
</tr>
|
288
|
+
<tr>
|
289
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
290
|
+
<td>whether an error was set</td>
|
291
|
+
</tr>
|
292
|
+
</tbody>
|
293
|
+
</table></div>
|
294
|
+
</div>
|
295
|
+
<hr>
|
296
|
+
<div class="refsect2">
|
297
|
+
<a name="GdkPixbufSaveFunc"></a><h3>GdkPixbufSaveFunc ()</h3>
|
298
|
+
<pre class="programlisting"><span class="returnvalue">gboolean</span> (*GdkPixbufSaveFunc) (<em class="parameter"><code>const <span class="type">gchar</span> *buf</code></em>,
|
299
|
+
<em class="parameter"><code><span class="type">gsize</span> count</code></em>,
|
300
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>,
|
301
|
+
<em class="parameter"><code><span class="type">gpointer</span> data</code></em>);</pre>
|
302
|
+
<p>
|
303
|
+
Specifies the type of the function passed to
|
304
|
+
<a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save-to-callback" title="gdk_pixbuf_save_to_callback ()"><code class="function">gdk_pixbuf_save_to_callback()</code></a>. It is called once for each block of
|
305
|
+
bytes that is "written" by <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save-to-callback" title="gdk_pixbuf_save_to_callback ()"><code class="function">gdk_pixbuf_save_to_callback()</code></a>. If
|
306
|
+
successful it should return <code class="literal">TRUE</code>. If an error occurs it should set
|
307
|
+
<em class="parameter"><code>error</code></em> and return <code class="literal">FALSE</code>, in which case <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save-to-callback" title="gdk_pixbuf_save_to_callback ()"><code class="function">gdk_pixbuf_save_to_callback()</code></a>
|
308
|
+
will fail with the same error.
|
309
|
+
</p>
|
310
|
+
<div class="variablelist"><table border="0">
|
311
|
+
<col align="left" valign="top">
|
312
|
+
<tbody>
|
313
|
+
<tr>
|
314
|
+
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
|
315
|
+
<td>bytes to be written.</td>
|
316
|
+
</tr>
|
317
|
+
<tr>
|
318
|
+
<td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td>
|
319
|
+
<td>number of bytes in <em class="parameter"><code>buf</code></em>.</td>
|
320
|
+
</tr>
|
321
|
+
<tr>
|
322
|
+
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
323
|
+
<td>A location to return an error. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
|
324
|
+
</td>
|
325
|
+
</tr>
|
326
|
+
<tr>
|
327
|
+
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
|
328
|
+
<td>user data passed to <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save-to-callback" title="gdk_pixbuf_save_to_callback ()"><code class="function">gdk_pixbuf_save_to_callback()</code></a>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
|
329
|
+
</td>
|
330
|
+
</tr>
|
331
|
+
<tr>
|
332
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
333
|
+
<td>
|
334
|
+
<code class="literal">TRUE</code> if successful, <code class="literal">FALSE</code> (with <em class="parameter"><code>error</code></em> set) if failed.</td>
|
335
|
+
</tr>
|
336
|
+
</tbody>
|
337
|
+
</table></div>
|
338
|
+
<p class="since">Since 2.4</p>
|
339
|
+
</div>
|
340
|
+
<hr>
|
341
|
+
<div class="refsect2">
|
342
|
+
<a name="gdk-pixbuf-save-to-callback"></a><h3>gdk_pixbuf_save_to_callback ()</h3>
|
343
|
+
<pre class="programlisting"><span class="returnvalue">gboolean</span> gdk_pixbuf_save_to_callback (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
|
344
|
+
<em class="parameter"><code><a class="link" href="gdk-pixbuf-File-saving.html#GdkPixbufSaveFunc" title="GdkPixbufSaveFunc ()"><span class="type">GdkPixbufSaveFunc</span></a> save_func</code></em>,
|
345
|
+
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
|
346
|
+
<em class="parameter"><code>const <span class="type">char</span> *type</code></em>,
|
347
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>,
|
348
|
+
<em class="parameter"><code>...</code></em>);</pre>
|
349
|
+
<p>
|
350
|
+
Saves pixbuf in format <em class="parameter"><code>type</code></em> by feeding the produced data to a
|
351
|
+
callback. Can be used when you want to store the image to something
|
352
|
+
other than a file, such as an in-memory buffer or a socket.
|
353
|
+
If <em class="parameter"><code>error</code></em> is set, <code class="literal">FALSE</code> will be returned. Possible errors
|
354
|
+
include those in the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a> domain and whatever the save
|
355
|
+
function generates.
|
356
|
+
</p>
|
357
|
+
<p>
|
358
|
+
See <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save" title="gdk_pixbuf_save"><code class="function">gdk_pixbuf_save()</code></a> for more details.
|
359
|
+
</p>
|
360
|
+
<div class="variablelist"><table border="0">
|
361
|
+
<col align="left" valign="top">
|
362
|
+
<tbody>
|
363
|
+
<tr>
|
364
|
+
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
|
365
|
+
<td>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
|
366
|
+
</tr>
|
367
|
+
<tr>
|
368
|
+
<td><p><span class="term"><em class="parameter"><code>save_func</code></em> :</span></p></td>
|
369
|
+
<td>a function that is called to save each block of data that
|
370
|
+
the save routine generates. <span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span>
|
371
|
+
</td>
|
372
|
+
</tr>
|
373
|
+
<tr>
|
374
|
+
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
|
375
|
+
<td>user data to pass to the save function.</td>
|
376
|
+
</tr>
|
377
|
+
<tr>
|
378
|
+
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
|
379
|
+
<td>name of file format.</td>
|
380
|
+
</tr>
|
381
|
+
<tr>
|
382
|
+
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
383
|
+
<td>return location for error, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
384
|
+
</td>
|
385
|
+
</tr>
|
386
|
+
<tr>
|
387
|
+
<td><p><span class="term"><em class="parameter"><code>Varargs</code></em> :</span></p></td>
|
388
|
+
<td>list of key-value save options</td>
|
389
|
+
</tr>
|
390
|
+
<tr>
|
391
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
392
|
+
<td>whether an error was set</td>
|
393
|
+
</tr>
|
394
|
+
</tbody>
|
395
|
+
</table></div>
|
396
|
+
<p class="since">Since 2.4</p>
|
397
|
+
</div>
|
398
|
+
<hr>
|
399
|
+
<div class="refsect2">
|
400
|
+
<a name="gdk-pixbuf-save-to-callbackv"></a><h3>gdk_pixbuf_save_to_callbackv ()</h3>
|
401
|
+
<pre class="programlisting"><span class="returnvalue">gboolean</span> gdk_pixbuf_save_to_callbackv (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
|
402
|
+
<em class="parameter"><code><a class="link" href="gdk-pixbuf-File-saving.html#GdkPixbufSaveFunc" title="GdkPixbufSaveFunc ()"><span class="type">GdkPixbufSaveFunc</span></a> save_func</code></em>,
|
403
|
+
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
|
404
|
+
<em class="parameter"><code>const <span class="type">char</span> *type</code></em>,
|
405
|
+
<em class="parameter"><code><span class="type">char</span> **option_keys</code></em>,
|
406
|
+
<em class="parameter"><code><span class="type">char</span> **option_values</code></em>,
|
407
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
408
|
+
<p>
|
409
|
+
Saves pixbuf to a callback in format <em class="parameter"><code>type</code></em>, which is currently "jpeg",
|
410
|
+
"png", "tiff", "ico" or "bmp". If <em class="parameter"><code>error</code></em> is set, <code class="literal">FALSE</code> will be returned. See
|
411
|
+
<a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save-to-callback" title="gdk_pixbuf_save_to_callback ()"><code class="function">gdk_pixbuf_save_to_callback()</code></a> for more details.
|
412
|
+
</p>
|
413
|
+
<div class="variablelist"><table border="0">
|
414
|
+
<col align="left" valign="top">
|
415
|
+
<tbody>
|
416
|
+
<tr>
|
417
|
+
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
|
418
|
+
<td>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
|
419
|
+
</tr>
|
420
|
+
<tr>
|
421
|
+
<td><p><span class="term"><em class="parameter"><code>save_func</code></em> :</span></p></td>
|
422
|
+
<td>a function that is called to save each block of data that
|
423
|
+
the save routine generates. <span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span>
|
424
|
+
</td>
|
425
|
+
</tr>
|
426
|
+
<tr>
|
427
|
+
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
|
428
|
+
<td>user data to pass to the save function. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym> save_func]</span>
|
429
|
+
</td>
|
430
|
+
</tr>
|
431
|
+
<tr>
|
432
|
+
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
|
433
|
+
<td>name of file format.</td>
|
434
|
+
</tr>
|
435
|
+
<tr>
|
436
|
+
<td><p><span class="term"><em class="parameter"><code>option_keys</code></em> :</span></p></td>
|
437
|
+
<td>name of options to set, <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>-terminated. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span>
|
438
|
+
</td>
|
439
|
+
</tr>
|
440
|
+
<tr>
|
441
|
+
<td><p><span class="term"><em class="parameter"><code>option_values</code></em> :</span></p></td>
|
442
|
+
<td>values for named options. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span>
|
443
|
+
</td>
|
444
|
+
</tr>
|
445
|
+
<tr>
|
446
|
+
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
447
|
+
<td>return location for error, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
448
|
+
</td>
|
449
|
+
</tr>
|
450
|
+
<tr>
|
451
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
452
|
+
<td>whether an error was set</td>
|
453
|
+
</tr>
|
454
|
+
</tbody>
|
455
|
+
</table></div>
|
456
|
+
<p class="since">Since 2.4</p>
|
457
|
+
</div>
|
458
|
+
<hr>
|
459
|
+
<div class="refsect2">
|
460
|
+
<a name="gdk-pixbuf-save-to-buffer"></a><h3>gdk_pixbuf_save_to_buffer ()</h3>
|
461
|
+
<pre class="programlisting"><span class="returnvalue">gboolean</span> gdk_pixbuf_save_to_buffer (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
|
462
|
+
<em class="parameter"><code><span class="type">gchar</span> **buffer</code></em>,
|
463
|
+
<em class="parameter"><code><span class="type">gsize</span> *buffer_size</code></em>,
|
464
|
+
<em class="parameter"><code>const <span class="type">char</span> *type</code></em>,
|
465
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>,
|
466
|
+
<em class="parameter"><code>...</code></em>);</pre>
|
467
|
+
<p>
|
468
|
+
Saves pixbuf to a new buffer in format <em class="parameter"><code>type</code></em>, which is currently "jpeg",
|
469
|
+
"png", "tiff", "ico" or "bmp". This is a convenience function that uses
|
470
|
+
<a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save-to-callback" title="gdk_pixbuf_save_to_callback ()"><code class="function">gdk_pixbuf_save_to_callback()</code></a> to do the real work. Note that the buffer
|
471
|
+
is not nul-terminated and may contain embedded nuls.
|
472
|
+
If <em class="parameter"><code>error</code></em> is set, <code class="literal">FALSE</code> will be returned and <em class="parameter"><code>buffer</code></em> will be set to
|
473
|
+
<a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. Possible errors include those in the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a>
|
474
|
+
domain.
|
475
|
+
</p>
|
476
|
+
<p>
|
477
|
+
See <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save" title="gdk_pixbuf_save"><code class="function">gdk_pixbuf_save()</code></a> for more details.
|
478
|
+
</p>
|
479
|
+
<div class="variablelist"><table border="0">
|
480
|
+
<col align="left" valign="top">
|
481
|
+
<tbody>
|
482
|
+
<tr>
|
483
|
+
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
|
484
|
+
<td>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
|
485
|
+
</tr>
|
486
|
+
<tr>
|
487
|
+
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
|
488
|
+
<td>location to receive a pointer to the new buffer.</td>
|
489
|
+
</tr>
|
490
|
+
<tr>
|
491
|
+
<td><p><span class="term"><em class="parameter"><code>buffer_size</code></em> :</span></p></td>
|
492
|
+
<td>location to receive the size of the new buffer.</td>
|
493
|
+
</tr>
|
494
|
+
<tr>
|
495
|
+
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
|
496
|
+
<td>name of file format.</td>
|
497
|
+
</tr>
|
498
|
+
<tr>
|
499
|
+
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
500
|
+
<td>return location for error, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
501
|
+
</td>
|
502
|
+
</tr>
|
503
|
+
<tr>
|
504
|
+
<td><p><span class="term"><em class="parameter"><code>Varargs</code></em> :</span></p></td>
|
505
|
+
<td>list of key-value save options</td>
|
506
|
+
</tr>
|
507
|
+
<tr>
|
508
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
509
|
+
<td>whether an error was set</td>
|
510
|
+
</tr>
|
511
|
+
</tbody>
|
512
|
+
</table></div>
|
513
|
+
<p class="since">Since 2.4</p>
|
514
|
+
</div>
|
515
|
+
<hr>
|
516
|
+
<div class="refsect2">
|
517
|
+
<a name="gdk-pixbuf-save-to-bufferv"></a><h3>gdk_pixbuf_save_to_bufferv ()</h3>
|
518
|
+
<pre class="programlisting"><span class="returnvalue">gboolean</span> gdk_pixbuf_save_to_bufferv (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
|
519
|
+
<em class="parameter"><code><span class="type">gchar</span> **buffer</code></em>,
|
520
|
+
<em class="parameter"><code><span class="type">gsize</span> *buffer_size</code></em>,
|
521
|
+
<em class="parameter"><code>const <span class="type">char</span> *type</code></em>,
|
522
|
+
<em class="parameter"><code><span class="type">char</span> **option_keys</code></em>,
|
523
|
+
<em class="parameter"><code><span class="type">char</span> **option_values</code></em>,
|
524
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
525
|
+
<p>
|
526
|
+
Saves pixbuf to a new buffer in format <em class="parameter"><code>type</code></em>, which is currently "jpeg",
|
527
|
+
"tiff", "png", "ico" or "bmp". See <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save-to-buffer" title="gdk_pixbuf_save_to_buffer ()"><code class="function">gdk_pixbuf_save_to_buffer()</code></a>
|
528
|
+
for more details.
|
529
|
+
</p>
|
530
|
+
<div class="variablelist"><table border="0">
|
531
|
+
<col align="left" valign="top">
|
532
|
+
<tbody>
|
533
|
+
<tr>
|
534
|
+
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
|
535
|
+
<td>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
|
536
|
+
</tr>
|
537
|
+
<tr>
|
538
|
+
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
|
539
|
+
<td>location to receive a pointer to the new buffer.</td>
|
540
|
+
</tr>
|
541
|
+
<tr>
|
542
|
+
<td><p><span class="term"><em class="parameter"><code>buffer_size</code></em> :</span></p></td>
|
543
|
+
<td>location to receive the size of the new buffer.</td>
|
544
|
+
</tr>
|
545
|
+
<tr>
|
546
|
+
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
|
547
|
+
<td>name of file format.</td>
|
548
|
+
</tr>
|
549
|
+
<tr>
|
550
|
+
<td><p><span class="term"><em class="parameter"><code>option_keys</code></em> :</span></p></td>
|
551
|
+
<td>name of options to set, <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>-terminated. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span>
|
552
|
+
</td>
|
553
|
+
</tr>
|
554
|
+
<tr>
|
555
|
+
<td><p><span class="term"><em class="parameter"><code>option_values</code></em> :</span></p></td>
|
556
|
+
<td>values for named options. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span>
|
557
|
+
</td>
|
558
|
+
</tr>
|
559
|
+
<tr>
|
560
|
+
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
561
|
+
<td>return location for error, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
562
|
+
</td>
|
563
|
+
</tr>
|
564
|
+
<tr>
|
565
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
566
|
+
<td>whether an error was set</td>
|
567
|
+
</tr>
|
568
|
+
</tbody>
|
569
|
+
</table></div>
|
570
|
+
<p class="since">Since 2.4</p>
|
571
|
+
</div>
|
572
|
+
<hr>
|
573
|
+
<div class="refsect2">
|
574
|
+
<a name="gdk-pixbuf-save-to-stream"></a><h3>gdk_pixbuf_save_to_stream ()</h3>
|
575
|
+
<pre class="programlisting"><span class="returnvalue">gboolean</span> gdk_pixbuf_save_to_stream (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
|
576
|
+
<em class="parameter"><code><span class="type">GOutputStream</span> *stream</code></em>,
|
577
|
+
<em class="parameter"><code>const <span class="type">char</span> *type</code></em>,
|
578
|
+
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
579
|
+
<em class="parameter"><code><span class="type">GError</span> **error</code></em>,
|
580
|
+
<em class="parameter"><code>...</code></em>);</pre>
|
581
|
+
<p>
|
582
|
+
Saves <em class="parameter"><code>pixbuf</code></em> to an output stream.
|
583
|
+
</p>
|
584
|
+
<p>
|
585
|
+
Supported file formats are currently "jpeg", "tiff", "png", "ico" or
|
586
|
+
"bmp". See <a class="link" href="gdk-pixbuf-File-saving.html#gdk-pixbuf-save-to-buffer" title="gdk_pixbuf_save_to_buffer ()"><code class="function">gdk_pixbuf_save_to_buffer()</code></a> for more details.
|
587
|
+
</p>
|
588
|
+
<p>
|
589
|
+
The <em class="parameter"><code>cancellable</code></em> can be used to abort the operation from another
|
590
|
+
thread. If the operation was cancelled, the error <code class="literal">GIO_ERROR_CANCELLED</code>
|
591
|
+
will be returned. Other possible errors are in the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR:CAPS" title="GDK_PIXBUF_ERROR"><span class="type">GDK_PIXBUF_ERROR</span></a>
|
592
|
+
and <code class="literal">G_IO_ERROR</code> domains.
|
593
|
+
</p>
|
594
|
+
<p>
|
595
|
+
The stream is not closed.
|
596
|
+
</p>
|
597
|
+
<div class="variablelist"><table border="0">
|
598
|
+
<col align="left" valign="top">
|
599
|
+
<tbody>
|
600
|
+
<tr>
|
601
|
+
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
|
602
|
+
<td>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
|
603
|
+
</td>
|
604
|
+
</tr>
|
605
|
+
<tr>
|
606
|
+
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
|
607
|
+
<td>a <span class="type">GOutputStream</span> to save the pixbuf to</td>
|
608
|
+
</tr>
|
609
|
+
<tr>
|
610
|
+
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
|
611
|
+
<td>name of file format</td>
|
612
|
+
</tr>
|
613
|
+
<tr>
|
614
|
+
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
|
615
|
+
<td>optional <span class="type">GCancellable</span> object, <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> to ignore</td>
|
616
|
+
</tr>
|
617
|
+
<tr>
|
618
|
+
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
619
|
+
<td>return location for error, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
620
|
+
</td>
|
621
|
+
</tr>
|
622
|
+
<tr>
|
623
|
+
<td><p><span class="term"><em class="parameter"><code>Varargs</code></em> :</span></p></td>
|
624
|
+
<td>list of key-value save options</td>
|
625
|
+
</tr>
|
626
|
+
<tr>
|
627
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
628
|
+
<td>
|
629
|
+
<code class="literal">TRUE</code> if the pixbuf was saved successfully, <code class="literal">FALSE</code> if an
|
630
|
+
error was set.</td>
|
631
|
+
</tr>
|
632
|
+
</tbody>
|
633
|
+
</table></div>
|
634
|
+
<p class="since">Since 2.14</p>
|
635
|
+
</div>
|
636
|
+
</div>
|
637
|
+
</div>
|
638
|
+
<div class="footer">
|
639
|
+
<hr>
|
640
|
+
Generated by GTK-Doc V1.17.1</div>
|
641
|
+
</body>
|
642
|
+
</html>
|