~ubuntu-branches/ubuntu/utopic/vips/utopic-proposed

« back to all changes in this revision

Viewing changes to doc/reference/html/VipsForeign.html

  • Committer: Package Import Robot
  • Author(s): Jay Berkenbilt
  • Date: 2014-06-21 16:35:51 UTC
  • mfrom: (1.2.23)
  • Revision ID: package-import@ubuntu.com-20140621163551-l7mq3sjc5pkf94eu
Tags: 7.38.6-1
* New upstream version.
* Remove no-longer-needed dependency on gcc 4.7 for armhf. (Closes:
  #748006)
* Upstream version includes new German transltion. (Closes: #743613)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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>VipsForeign</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
 
<link rel="home" href="index.html" title="VIPS Reference Manual">
8
 
<link rel="up" href="ch02.html" title="VIPS operation API by section">
9
 
<link rel="prev" href="libvips-convolution.html" title="convolution">
10
 
<link rel="next" href="libvips-freqfilt.html" title="freqfilt">
11
 
<meta name="generator" content="GTK-Doc V1.19 (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="libvips-convolution.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
 
<td><a accesskey="u" href="ch02.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">VIPS Reference Manual</th>
21
 
<td><a accesskey="n" href="libvips-freqfilt.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="#VipsForeign.synopsis" class="shortcut">Top</a>
25
 
                   | 
26
 
                  <a href="#VipsForeign.description" class="shortcut">Description</a>
27
 
                   | 
28
 
                  <a href="#VipsForeign.object-hierarchy" class="shortcut">Object Hierarchy</a>
29
 
                   | 
30
 
                  <a href="#VipsForeign.properties" class="shortcut">Properties</a>
31
 
</td></tr>
32
 
</table>
33
 
<div class="refentry">
34
 
<a name="VipsForeign"></a><div class="titlepage"></div>
35
 
<div class="refnamediv"><table width="100%"><tr>
36
 
<td valign="top">
37
 
<h2><span class="refentrytitle"><a name="VipsForeign.top_of_page"></a>VipsForeign</span></h2>
38
 
<p>VipsForeign — load and save images in a variety of formats</p>
39
 
</td>
40
 
<td valign="top" align="right"></td>
41
 
</tr></table></div>
42
 
<div class="refsect1">
43
 
<a name="VipsForeign.stability-level"></a><h2>Stability Level</h2>
44
 
Stable, unless otherwise indicated
45
 
</div>
46
 
<div class="refsynopsisdiv">
47
 
<a name="VipsForeign.synopsis"></a><h2>Synopsis</h2>
48
 
<a name="VipsForeignLoad"></a><a name="VipsForeignSave"></a><pre class="synopsis">
49
 
#include &lt;vips/vips.h&gt;
50
 
 
51
 
                    <a class="link" href="VipsForeign.html#VipsForeign-struct" title="VipsForeign">VipsForeign</a>;
52
 
                    <a class="link" href="VipsForeign.html#VipsForeignClass" title="VipsForeignClass">VipsForeignClass</a>;
53
 
<span class="returnvalue">void</span> *              <a class="link" href="VipsForeign.html#vips-foreign-map" title="vips_foreign_map ()">vips_foreign_map</a>                    (<em class="parameter"><code>const <span class="type">char</span> *base</code></em>,
54
 
                                                         <em class="parameter"><code><span class="type">VipsSListMap2Fn</span> fn</code></em>,
55
 
                                                         <em class="parameter"><code><span class="type">void</span> *a</code></em>,
56
 
                                                         <em class="parameter"><code><span class="type">void</span> *b</code></em>);
57
 
enum                <a class="link" href="VipsForeign.html#VipsForeignFlags" title="enum VipsForeignFlags">VipsForeignFlags</a>;
58
 
                    <a class="link" href="VipsForeign.html#VipsForeignLoad-struct" title="VipsForeignLoad">VipsForeignLoad</a>;
59
 
                    <a class="link" href="VipsForeign.html#VipsForeignLoadClass" title="VipsForeignLoadClass">VipsForeignLoadClass</a>;
60
 
const <span class="returnvalue">char</span> *        <a class="link" href="VipsForeign.html#vips-foreign-find-load" title="vips_foreign_find_load ()">vips_foreign_find_load</a>              (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);
61
 
const <span class="returnvalue">char</span> *        <a class="link" href="VipsForeign.html#vips-foreign-find-load-options" title="vips_foreign_find_load_options ()">vips_foreign_find_load_options</a>      (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);
62
 
<a class="link" href="VipsForeign.html#VipsForeignFlags" title="enum VipsForeignFlags"><span class="returnvalue">VipsForeignFlags</span></a>    <a class="link" href="VipsForeign.html#vips-foreign-flags" title="vips_foreign_flags ()">vips_foreign_flags</a>                  (<em class="parameter"><code>const <span class="type">char</span> *loader</code></em>,
63
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);
64
 
<span class="returnvalue">gboolean</span>            <a class="link" href="VipsForeign.html#vips-foreign-is-a" title="vips_foreign_is_a ()">vips_foreign_is_a</a>                   (<em class="parameter"><code>const <span class="type">char</span> *loader</code></em>,
65
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);
66
 
enum                <a class="link" href="VipsForeign.html#VipsSaveable" title="enum VipsSaveable">VipsSaveable</a>;
67
 
                    <a class="link" href="VipsForeign.html#VipsForeignSave-struct" title="VipsForeignSave">VipsForeignSave</a>;
68
 
                    <a class="link" href="VipsForeign.html#VipsForeignSaveClass" title="VipsForeignSaveClass">VipsForeignSaveClass</a>;
69
 
const <span class="returnvalue">char</span> *        <a class="link" href="VipsForeign.html#vips-foreign-find-save" title="vips_foreign_find_save ()">vips_foreign_find_save</a>              (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);
70
 
const <span class="returnvalue">char</span> *        <a class="link" href="VipsForeign.html#vips-foreign-find-save-options" title="vips_foreign_find_save_options ()">vips_foreign_find_save_options</a>      (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);
71
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-foreign-load" title="vips_foreign_load ()">vips_foreign_load</a>                   (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
72
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
73
 
                                                         <em class="parameter"><code>...</code></em>);
74
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-foreign-save" title="vips_foreign_save ()">vips_foreign_save</a>                   (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
75
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
76
 
                                                         <em class="parameter"><code>...</code></em>);
77
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-foreign-load-options" title="vips_foreign_load_options ()">vips_foreign_load_options</a>           (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
78
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
79
 
                                                         <em class="parameter"><code>...</code></em>);
80
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-foreign-save-options" title="vips_foreign_save_options ()">vips_foreign_save_options</a>           (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
81
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
82
 
                                                         <em class="parameter"><code>...</code></em>);
83
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-openslideload" title="vips_openslideload ()">vips_openslideload</a>                  (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
84
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
85
 
                                                         <em class="parameter"><code>...</code></em>);
86
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-jpegload" title="vips_jpegload ()">vips_jpegload</a>                       (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
87
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
88
 
                                                         <em class="parameter"><code>...</code></em>);
89
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-jpegload-buffer" title="vips_jpegload_buffer ()">vips_jpegload_buffer</a>                (<em class="parameter"><code><span class="type">void</span> *buf</code></em>,
90
 
                                                         <em class="parameter"><code><span class="type">size_t</span> len</code></em>,
91
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
92
 
                                                         <em class="parameter"><code>...</code></em>);
93
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-jpegsave" title="vips_jpegsave ()">vips_jpegsave</a>                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
94
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
95
 
                                                         <em class="parameter"><code>...</code></em>);
96
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-jpegsave-buffer" title="vips_jpegsave_buffer ()">vips_jpegsave_buffer</a>                (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
97
 
                                                         <em class="parameter"><code><span class="type">void</span> **buf</code></em>,
98
 
                                                         <em class="parameter"><code><span class="type">size_t</span> *len</code></em>,
99
 
                                                         <em class="parameter"><code>...</code></em>);
100
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-jpegsave-mime" title="vips_jpegsave_mime ()">vips_jpegsave_mime</a>                  (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
101
 
                                                         <em class="parameter"><code>...</code></em>);
102
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-webpload" title="vips_webpload ()">vips_webpload</a>                       (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
103
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
104
 
                                                         <em class="parameter"><code>...</code></em>);
105
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-webpload-buffer" title="vips_webpload_buffer ()">vips_webpload_buffer</a>                (<em class="parameter"><code><span class="type">void</span> *buf</code></em>,
106
 
                                                         <em class="parameter"><code><span class="type">size_t</span> len</code></em>,
107
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
108
 
                                                         <em class="parameter"><code>...</code></em>);
109
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-webpsave" title="vips_webpsave ()">vips_webpsave</a>                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
110
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
111
 
                                                         <em class="parameter"><code>...</code></em>);
112
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-webpsave-buffer" title="vips_webpsave_buffer ()">vips_webpsave_buffer</a>                (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
113
 
                                                         <em class="parameter"><code><span class="type">void</span> **buf</code></em>,
114
 
                                                         <em class="parameter"><code><span class="type">size_t</span> *len</code></em>,
115
 
                                                         <em class="parameter"><code>...</code></em>);
116
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-webpsave-mime" title="vips_webpsave_mime ()">vips_webpsave_mime</a>                  (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
117
 
                                                         <em class="parameter"><code>...</code></em>);
118
 
enum                <a class="link" href="VipsForeign.html#VipsForeignTiffCompression" title="enum VipsForeignTiffCompression">VipsForeignTiffCompression</a>;
119
 
enum                <a class="link" href="VipsForeign.html#VipsForeignTiffPredictor" title="enum VipsForeignTiffPredictor">VipsForeignTiffPredictor</a>;
120
 
enum                <a class="link" href="VipsForeign.html#VipsForeignTiffResunit" title="enum VipsForeignTiffResunit">VipsForeignTiffResunit</a>;
121
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-tiffload" title="vips_tiffload ()">vips_tiffload</a>                       (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
122
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
123
 
                                                         <em class="parameter"><code>...</code></em>);
124
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-tiffsave" title="vips_tiffsave ()">vips_tiffsave</a>                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
125
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
126
 
                                                         <em class="parameter"><code>...</code></em>);
127
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-openexrload" title="vips_openexrload ()">vips_openexrload</a>                    (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
128
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
129
 
                                                         <em class="parameter"><code>...</code></em>);
130
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-fitsload" title="vips_fitsload ()">vips_fitsload</a>                       (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
131
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
132
 
                                                         <em class="parameter"><code>...</code></em>);
133
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-fitssave" title="vips_fitssave ()">vips_fitssave</a>                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
134
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
135
 
                                                         <em class="parameter"><code>...</code></em>);
136
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-analyzeload" title="vips_analyzeload ()">vips_analyzeload</a>                    (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
137
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
138
 
                                                         <em class="parameter"><code>...</code></em>);
139
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-rawload" title="vips_rawload ()">vips_rawload</a>                        (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
140
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
141
 
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
142
 
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
143
 
                                                         <em class="parameter"><code><span class="type">int</span> bands</code></em>,
144
 
                                                         <em class="parameter"><code>...</code></em>);
145
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-rawsave" title="vips_rawsave ()">vips_rawsave</a>                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
146
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
147
 
                                                         <em class="parameter"><code>...</code></em>);
148
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-rawsave-fd" title="vips_rawsave_fd ()">vips_rawsave_fd</a>                     (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
149
 
                                                         <em class="parameter"><code><span class="type">int</span> fd</code></em>,
150
 
                                                         <em class="parameter"><code>...</code></em>);
151
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-csvload" title="vips_csvload ()">vips_csvload</a>                        (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
152
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
153
 
                                                         <em class="parameter"><code>...</code></em>);
154
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-csvsave" title="vips_csvsave ()">vips_csvsave</a>                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
155
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
156
 
                                                         <em class="parameter"><code>...</code></em>);
157
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-matrixload" title="vips_matrixload ()">vips_matrixload</a>                     (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
158
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
159
 
                                                         <em class="parameter"><code>...</code></em>);
160
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-matrixsave" title="vips_matrixsave ()">vips_matrixsave</a>                     (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
161
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
162
 
                                                         <em class="parameter"><code>...</code></em>);
163
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-matrixprint" title="vips_matrixprint ()">vips_matrixprint</a>                    (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
164
 
                                                         <em class="parameter"><code>...</code></em>);
165
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-magickload" title="vips_magickload ()">vips_magickload</a>                     (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
166
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
167
 
                                                         <em class="parameter"><code>...</code></em>);
168
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-pngload" title="vips_pngload ()">vips_pngload</a>                        (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
169
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
170
 
                                                         <em class="parameter"><code>...</code></em>);
171
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-pngload-buffer" title="vips_pngload_buffer ()">vips_pngload_buffer</a>                 (<em class="parameter"><code><span class="type">void</span> *buf</code></em>,
172
 
                                                         <em class="parameter"><code><span class="type">size_t</span> len</code></em>,
173
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
174
 
                                                         <em class="parameter"><code>...</code></em>);
175
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-pngsave" title="vips_pngsave ()">vips_pngsave</a>                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
176
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
177
 
                                                         <em class="parameter"><code>...</code></em>);
178
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-pngsave-buffer" title="vips_pngsave_buffer ()">vips_pngsave_buffer</a>                 (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
179
 
                                                         <em class="parameter"><code><span class="type">void</span> **buf</code></em>,
180
 
                                                         <em class="parameter"><code><span class="type">size_t</span> *len</code></em>,
181
 
                                                         <em class="parameter"><code>...</code></em>);
182
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-ppmload" title="vips_ppmload ()">vips_ppmload</a>                        (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
183
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
184
 
                                                         <em class="parameter"><code>...</code></em>);
185
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-ppmsave" title="vips_ppmsave ()">vips_ppmsave</a>                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
186
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
187
 
                                                         <em class="parameter"><code>...</code></em>);
188
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-matload" title="vips_matload ()">vips_matload</a>                        (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
189
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
190
 
                                                         <em class="parameter"><code>...</code></em>);
191
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-radload" title="vips_radload ()">vips_radload</a>                        (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
192
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
193
 
                                                         <em class="parameter"><code>...</code></em>);
194
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-radsave" title="vips_radsave ()">vips_radsave</a>                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
195
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
196
 
                                                         <em class="parameter"><code>...</code></em>);
197
 
enum                <a class="link" href="VipsForeign.html#VipsForeignDzLayout" title="enum VipsForeignDzLayout">VipsForeignDzLayout</a>;
198
 
enum                <a class="link" href="VipsForeign.html#VipsForeignDzDepth" title="enum VipsForeignDzDepth">VipsForeignDzDepth</a>;
199
 
<span class="returnvalue">int</span>                 <a class="link" href="VipsForeign.html#vips-dzsave" title="vips_dzsave ()">vips_dzsave</a>                         (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
200
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *basename</code></em>,
201
 
                                                         <em class="parameter"><code>...</code></em>);
202
 
</pre>
203
 
</div>
204
 
<div class="refsect1">
205
 
<a name="VipsForeign.object-hierarchy"></a><h2>Object Hierarchy</h2>
206
 
<pre class="synopsis">
207
 
  GObject
208
 
   +----<a class="link" href="libvips-VipsArgument.html#VipsObject">VipsObject</a>
209
 
         +----<a class="link" href="VipsOperation.html" title="VipsOperation">VipsOperation</a>
210
 
               +----VipsForeign
211
 
                     +----<a class="link" href="VipsForeign.html#VipsForeignLoad">VipsForeignLoad</a>
212
 
                     +----<a class="link" href="VipsForeign.html#VipsForeignSave">VipsForeignSave</a>
213
 
</pre>
214
 
<pre class="synopsis">
215
 
  GObject
216
 
   +----<a class="link" href="libvips-VipsArgument.html#VipsObject">VipsObject</a>
217
 
         +----<a class="link" href="VipsOperation.html" title="VipsOperation">VipsOperation</a>
218
 
               +----<a class="link" href="VipsForeign.html" title="VipsForeign">VipsForeign</a>
219
 
                     +----VipsForeignLoad
220
 
</pre>
221
 
<pre class="synopsis">
222
 
  GObject
223
 
   +----<a class="link" href="libvips-VipsArgument.html#VipsObject">VipsObject</a>
224
 
         +----<a class="link" href="VipsOperation.html" title="VipsOperation">VipsOperation</a>
225
 
               +----<a class="link" href="VipsForeign.html" title="VipsForeign">VipsForeign</a>
226
 
                     +----VipsForeignSave
227
 
</pre>
228
 
</div>
229
 
<div class="refsect1">
230
 
<a name="VipsForeign.properties"></a><h2>Properties</h2>
231
 
<pre class="synopsis">
232
 
  "<a class="link" href="VipsForeign.html#VipsForeignLoad--access" title='The "access" property'>access</a>"                   <a class="link" href="VipsImage.html#VipsAccess" title="enum VipsAccess"><span class="type">VipsAccess</span></a>            : Read / Write
233
 
  "<a class="link" href="VipsForeign.html#VipsForeignLoad--disc" title='The "disc" property'>disc</a>"                     <span class="type">gboolean</span>              : Read / Write
234
 
  "<a class="link" href="VipsForeign.html#VipsForeignLoad--flags" title='The "flags" property'>flags</a>"                    <a class="link" href="VipsForeign.html#VipsForeignFlags" title="enum VipsForeignFlags"><span class="type">VipsForeignFlags</span></a>      : Read / Write
235
 
  "<a class="link" href="VipsForeign.html#VipsForeignLoad--out" title='The "out" property'>out</a>"                      <a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a>*            : Read / Write
236
 
  "<a class="link" href="VipsForeign.html#VipsForeignLoad--sequential" title='The "sequential" property'>sequential</a>"               <span class="type">gboolean</span>              : Read / Write
237
 
  "<a class="link" href="VipsForeign.html#VipsForeignSave--in" title='The "in" property'>in</a>"                       <a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a>*            : Read / Write
238
 
  "<a class="link" href="VipsForeign.html#VipsForeignSave--strip" title='The "strip" property'>strip</a>"                    <span class="type">gboolean</span>              : Read / Write
239
 
</pre>
240
 
</div>
241
 
<div class="refsect1">
242
 
<a name="VipsForeign.description"></a><h2>Description</h2>
243
 
<p>
244
 
This set of operations load and save images in a variety of formats. 
245
 
</p>
246
 
<p>
247
 
The operations share a base class that offers a simple way to search for a
248
 
subclass of <a class="link" href="VipsForeign.html" title="VipsForeign"><span class="type">VipsForeign</span></a> which can load a certain file (see
249
 
<a class="link" href="VipsForeign.html#vips-foreign-find-load" title="vips_foreign_find_load ()"><code class="function">vips_foreign_find_load()</code></a>) or which could be used to save an image to a
250
 
certain file type (see <a class="link" href="VipsForeign.html#vips-foreign-find-save" title="vips_foreign_find_save ()"><code class="function">vips_foreign_find_save()</code></a>). You can then run these
251
 
operations using <a class="link" href="VipsOperation.html#vips-call" title="vips_call ()"><code class="function">vips_call()</code></a> and friends to perform the load or save.
252
 
</p>
253
 
<p>
254
 
A pair of convenience
255
 
functions, <a class="link" href="VipsForeign.html#vips-foreign-load" title="vips_foreign_load ()"><code class="function">vips_foreign_load()</code></a> and <a class="link" href="VipsForeign.html#vips-foreign-save" title="vips_foreign_save ()"><code class="function">vips_foreign_save()</code></a>, automate the
256
 
process, loading an image from a file or saving an image to a file. These
257
 
functions let you give load or save options as name - value pairs in the C
258
 
argument list. You can use <a class="link" href="VipsForeign.html#vips-foreign-load-options" title="vips_foreign_load_options ()"><code class="function">vips_foreign_load_options()</code></a> and
259
 
<a class="link" href="VipsForeign.html#vips-foreign-save-options" title="vips_foreign_save_options ()"><code class="function">vips_foreign_save_options()</code></a> to include options in the file name.
260
 
</p>
261
 
<p>
262
 
For example:
263
 
</p>
264
 
<p>
265
 
</p>
266
 
<div class="informalexample"><pre class="programlisting">
267
 
vips_foreign_save (my_image, "frank.tiff", 
268
 
    "compression", VIPS_FOREIGN_TIFF_COMPRESSION_JPEG,
269
 
    NULL);
270
 
</pre></div>
271
 
<p>
272
 
</p>
273
 
<p>
274
 
Will save an image to the file "frank.tiff" in TIFF format (selected by
275
 
the file name extension) with JPEG compression.
276
 
</p>
277
 
<p>
278
 
</p>
279
 
<div class="informalexample"><pre class="programlisting">
280
 
vips_foreign_save_options (my_image, "frank.tiff[compression=jpeg]");  
281
 
</pre></div>
282
 
<p>
283
 
</p>
284
 
<p>
285
 
Is the same thing, but with the option in the filename.
286
 
</p>
287
 
<p>
288
 
You can also invoke the operations directly, for example:
289
 
</p>
290
 
<p>
291
 
</p>
292
 
<div class="informalexample"><pre class="programlisting">
293
 
vips_tiffsave (my_image, "frank.anything", 
294
 
    "compression", VIPS_FOREIGN_TIFF_COMPRESSION_JPEG,
295
 
    NULL);
296
 
</pre></div>
297
 
<p>
298
 
</p>
299
 
<p>
300
 
To add support for a new file format to vips, simply define a new subclass
301
 
of <a class="link" href="VipsForeign.html#VipsForeignLoad"><span class="type">VipsForeignLoad</span></a> or <a class="link" href="VipsForeign.html#VipsForeignSave"><span class="type">VipsForeignSave</span></a>. 
302
 
</p>
303
 
<p>
304
 
If you define a new operation which is a subclass of <a class="link" href="VipsForeign.html" title="VipsForeign"><span class="type">VipsForeign</span></a>, support 
305
 
for it automatically appears in all VIPS user-interfaces. It will also be
306
 
transparently supported by <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a> and friends.
307
 
</p>
308
 
<p>
309
 
VIPS comes with VipsForeign for TIFF, JPEG, PNG, Analyze, PPM, OpenEXR, CSV,
310
 
Matlab, Radiance, RAW, FITS and VIPS. It also 
311
 
includes import filters which can
312
 
load with libMagick and with OpenSlide.
313
 
</p>
314
 
</div>
315
 
<div class="refsect1">
316
 
<a name="VipsForeign.details"></a><h2>Details</h2>
317
 
<div class="refsect2">
318
 
<a name="VipsForeign-struct"></a><h3>VipsForeign</h3>
319
 
<pre class="programlisting">typedef struct _VipsForeign VipsForeign;</pre>
320
 
<p>
321
 
</p>
322
 
</div>
323
 
<hr>
324
 
<div class="refsect2">
325
 
<a name="VipsForeignClass"></a><h3>VipsForeignClass</h3>
326
 
<pre class="programlisting">typedef struct {
327
 
        VipsOperationClass parent_class;
328
 
 
329
 
 
330
 
        /* Loop over formats in this order, default 0. We need this because
331
 
         * some formats can be read by several loaders (eg. tiff can be read
332
 
         * by the libMagick loader as well as by the tiff loader), and we want
333
 
         * to make sure the better loader comes first.
334
 
         */
335
 
        int priority;
336
 
 
337
 
        /* Null-terminated list of recommended suffixes, eg. ".tif", ".tiff".
338
 
         * This can be used by both load and save, so it's in the base class.
339
 
         */
340
 
        const char **suffs;
341
 
} VipsForeignClass;
342
 
</pre>
343
 
<p>
344
 
The suffix list is used to select a format to save a file in, and to pick a
345
 
loader if you don't define <code class="function">is_a()</code>.
346
 
</p>
347
 
<p>
348
 
You should also define <em class="parameter"><code>nickname</code></em> and <em class="parameter"><code>description</code></em> in <a class="link" href="libvips-VipsArgument.html#VipsObject"><span class="type">VipsObject</span></a>.
349
 
</p>
350
 
</div>
351
 
<hr>
352
 
<div class="refsect2">
353
 
<a name="vips-foreign-map"></a><h3>vips_foreign_map ()</h3>
354
 
<pre class="programlisting"><span class="returnvalue">void</span> *              vips_foreign_map                    (<em class="parameter"><code>const <span class="type">char</span> *base</code></em>,
355
 
                                                         <em class="parameter"><code><span class="type">VipsSListMap2Fn</span> fn</code></em>,
356
 
                                                         <em class="parameter"><code><span class="type">void</span> *a</code></em>,
357
 
                                                         <em class="parameter"><code><span class="type">void</span> *b</code></em>);</pre>
358
 
<p>
359
 
Apply a function to every <a class="link" href="VipsForeign.html#VipsForeignClass" title="VipsForeignClass"><span class="type">VipsForeignClass</span></a> that VIPS knows about. Foreigns
360
 
are presented to the function in priority order. 
361
 
</p>
362
 
<p>
363
 
Like all VIPS map functions, if <em class="parameter"><code>fn</code></em> returns <code class="literal">NULL</code>, iteration continues. If
364
 
it returns non-<code class="literal">NULL</code>, iteration terminates and that value is returned. The
365
 
map function returns <code class="literal">NULL</code> if all calls return <code class="literal">NULL</code>.
366
 
</p>
367
 
<p>
368
 
See also: <code class="function">vips_slist_map()</code>.
369
 
</p>
370
 
<div class="variablelist"><table border="0" class="variablelist">
371
 
<colgroup>
372
 
<col align="left" valign="top">
373
 
<col>
374
 
</colgroup>
375
 
<tbody>
376
 
<tr>
377
 
<td><p><span class="term"><em class="parameter"><code>base</code></em> :</span></p></td>
378
 
<td>base class to search below (eg. "VipsForeignLoad")</td>
379
 
</tr>
380
 
<tr>
381
 
<td><p><span class="term"><em class="parameter"><code>fn</code></em> :</span></p></td>
382
 
<td>function to apply to each <a class="link" href="VipsForeign.html#VipsForeignClass" title="VipsForeignClass"><span class="type">VipsForeignClass</span></a>. <span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span>
383
 
</td>
384
 
</tr>
385
 
<tr>
386
 
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
387
 
<td>user data</td>
388
 
</tr>
389
 
<tr>
390
 
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
391
 
<td>user data</td>
392
 
</tr>
393
 
<tr>
394
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
395
 
<td>the result of iteration. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
396
 
</td>
397
 
</tr>
398
 
</tbody>
399
 
</table></div>
400
 
</div>
401
 
<hr>
402
 
<div class="refsect2">
403
 
<a name="VipsForeignFlags"></a><h3>enum VipsForeignFlags</h3>
404
 
<pre class="programlisting">typedef enum {
405
 
        VIPS_FOREIGN_NONE = 0,          /* No flags set */
406
 
        VIPS_FOREIGN_PARTIAL = 1, /* Lazy read OK (eg. tiled tiff) */
407
 
        VIPS_FOREIGN_BIGENDIAN = 2, /* Most-significant byte first */
408
 
        VIPS_FOREIGN_SEQUENTIAL = 4, /* Top-to-bottom lazy read OK */
409
 
        VIPS_FOREIGN_ALL = 7            /* All flags set */
410
 
} VipsForeignFlags;
411
 
</pre>
412
 
<p>
413
 
Some hints about the image loader.
414
 
</p>
415
 
<p>
416
 
<em class="parameter"><code>VIPS_FOREIGN_PARTIAL</code></em> means that the image can be read directly from the
417
 
file without needing to be unpacked to a temporary image first. 
418
 
</p>
419
 
<p>
420
 
<em class="parameter"><code>VIPS_FOREIGN_SEQUENTIAL</code></em> means that the loader supports lazy reading, but
421
 
only top-to-bottom (sequential) access. Formats like PNG can read sets of
422
 
scanlines, for example, but only in order. 
423
 
</p>
424
 
<p>
425
 
If neither PARTIAL or SEQUENTIAL is set, the loader only supports whole
426
 
image read. Setting both PARTIAL and SEQUENTIAL is an error.
427
 
</p>
428
 
<p>
429
 
<em class="parameter"><code>VIPS_FOREIGN_BIGENDIAN</code></em> means that image pixels are most-significant byte
430
 
first. Depending on the native byte order of the host machine, you may
431
 
need to swap bytes. See <a class="link" href="libvips-conversion.html#vips-copy" title="vips_copy ()"><code class="function">vips_copy()</code></a>.
432
 
</p>
433
 
<div class="variablelist"><table border="0" class="variablelist">
434
 
<colgroup>
435
 
<col align="left" valign="top">
436
 
<col>
437
 
</colgroup>
438
 
<tbody>
439
 
<tr>
440
 
<td><p><a name="VIPS-FOREIGN-NONE:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_NONE</code></span></p></td>
441
 
<td>no flags set
442
 
</td>
443
 
</tr>
444
 
<tr>
445
 
<td><p><a name="VIPS-FOREIGN-PARTIAL:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_PARTIAL</code></span></p></td>
446
 
<td>the image may be read lazilly
447
 
</td>
448
 
</tr>
449
 
<tr>
450
 
<td><p><a name="VIPS-FOREIGN-BIGENDIAN:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_BIGENDIAN</code></span></p></td>
451
 
<td>image pixels are most-significant byte first
452
 
</td>
453
 
</tr>
454
 
<tr>
455
 
<td><p><a name="VIPS-FOREIGN-SEQUENTIAL:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_SEQUENTIAL</code></span></p></td>
456
 
<td>top-to-bottom lazy reading
457
 
</td>
458
 
</tr>
459
 
<tr>
460
 
<td><p><a name="VIPS-FOREIGN-ALL:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_ALL</code></span></p></td>
461
 
<td>
462
 
</td>
463
 
</tr>
464
 
</tbody>
465
 
</table></div>
466
 
</div>
467
 
<hr>
468
 
<div class="refsect2">
469
 
<a name="VipsForeignLoad-struct"></a><h3>VipsForeignLoad</h3>
470
 
<pre class="programlisting">typedef struct {
471
 
        /* The image we generate. This must be set by -&gt;header().
472
 
         */
473
 
        VipsImage *out;
474
 
 
475
 
        /* The behind-the-scenes real image we decompress to. This can be a
476
 
         * disc foreign or a memory buffer. This must be set by -&gt;load().
477
 
         */
478
 
        VipsImage *real;
479
 
 
480
 
        /* Set this to tag the operation as nocache.
481
 
         */
482
 
        gboolean nocache;
483
 
} VipsForeignLoad;
484
 
</pre>
485
 
<p>
486
 
<em class="parameter"><code><code class="function">header()</code></code></em> must set at least the header fields of <em class="parameter"><code>out</code></em>. <em class="parameter"><code><code class="function">laod()</code></code></em>, if defined,
487
 
must load the pixels to <em class="parameter"><code>real</code></em>.
488
 
</p>
489
 
</div>
490
 
<hr>
491
 
<div class="refsect2">
492
 
<a name="VipsForeignLoadClass"></a><h3>VipsForeignLoadClass</h3>
493
 
<pre class="programlisting">typedef struct {
494
 
        VipsForeignClass parent_class;
495
 
 
496
 
        /* Is a file in this format. 
497
 
         *
498
 
         * This function should return %TRUE if the file contains an image of 
499
 
         * this type. If you don't define this function, #VipsForeignLoad
500
 
         * will use @suffs instead.
501
 
         */
502
 
        gboolean (*is_a)( const char * );
503
 
 
504
 
        /* Get the flags from a filename. 
505
 
         *
506
 
         * This function should examine the file and return a set
507
 
         * of flags. If you don't define it, vips will default to 0 (no flags 
508
 
         * set).  
509
 
         *
510
 
         * This operation is necessary for vips7 compatibility. 
511
 
         */
512
 
        VipsForeignFlags (*get_flags_filename)( const char * );
513
 
 
514
 
        /* Get the flags for this load operation. Images can be loaded from 
515
 
         * (for example) memory areas rather than files, so you can't just use
516
 
         * @get_flags_filename().
517
 
         */
518
 
        VipsForeignFlags (*get_flags)( VipsForeignLoad * );
519
 
 
520
 
        /* Do the minimum read we can. 
521
 
         *
522
 
         * Set the header fields in @out from @filename. If you can read the 
523
 
         * whole image as well with no performance cost (as with vipsload),
524
 
         * or if your loader does not support reading only the header, read
525
 
         * the entire image in this method and leave @load() NULL.
526
 
         *
527
 
         * @header() needs to set the dhint on the image .. otherwise you get 
528
 
         * the default SMALLTILE.
529
 
         *
530
 
         * Return 0 for success, -1 for error, setting
531
 
         * vips_error().
532
 
         */
533
 
        int (*header)( VipsForeignLoad * );
534
 
 
535
 
        /* Read the whole image into @real. The pixels will get copied to @out 
536
 
         * later.
537
 
         *
538
 
         * You can omit this method if you define a @header() method which 
539
 
         * loads the whole file. 
540
 
         *
541
 
         * Return 0 for success, -1 for error, setting
542
 
         * vips_error().
543
 
         */
544
 
        int (*load)( VipsForeignLoad * );
545
 
} VipsForeignLoadClass;
546
 
</pre>
547
 
<p>
548
 
Add a new loader to VIPS by subclassing <a class="link" href="VipsForeign.html#VipsForeignLoad"><span class="type">VipsForeignLoad</span></a>. Subclasses need to 
549
 
implement at least <em class="parameter"><code><code class="function">header()</code></code></em>.
550
 
</p>
551
 
<p>
552
 
As a complete example, here's the code for the PNG loader, minus the actual
553
 
calls to libpng.
554
 
</p>
555
 
<p>
556
 
</p>
557
 
<div class="informalexample"><pre class="programlisting">
558
 
typedef struct _VipsForeignLoadPng {
559
 
        VipsForeignLoad parent_object;
560
 
 
561
 
        char *filename; 
562
 
} VipsForeignLoadPng;
563
 
 
564
 
typedef VipsForeignLoadClass VipsForeignLoadPngClass;
565
 
 
566
 
G_DEFINE_TYPE( VipsForeignLoadPng, vips_foreign_load_png, 
567
 
        VIPS_TYPE_FOREIGN_LOAD );
568
 
 
569
 
static VipsForeignFlags
570
 
vips_foreign_load_png_get_flags_filename( const char *filename )
571
 
{
572
 
        VipsForeignFlags flags;
573
 
 
574
 
        flags = 0;
575
 
        if( vips__png_isinterlaced( filename ) )
576
 
                flags = VIPS_FOREIGN_PARTIAL;
577
 
        else
578
 
                flags = VIPS_FOREIGN_SEQUENTIAL;
579
 
 
580
 
        return( flags );
581
 
}
582
 
 
583
 
static VipsForeignFlags
584
 
vips_foreign_load_png_get_flags( VipsForeignLoad *load )
585
 
{
586
 
        VipsForeignLoadPng *png = (VipsForeignLoadPng *) load;
587
 
 
588
 
        return( vips_foreign_load_png_get_flags_filename( png-&gt;filename ) );
589
 
}
590
 
 
591
 
static int
592
 
vips_foreign_load_png_header( VipsForeignLoad *load )
593
 
{
594
 
        VipsForeignLoadPng *png = (VipsForeignLoadPng *) load;
595
 
 
596
 
        if( vips__png_header( png-&gt;filename, load-&gt;out ) )
597
 
                return( -1 );
598
 
 
599
 
        return( 0 );
600
 
}
601
 
 
602
 
static int
603
 
vips_foreign_load_png_load( VipsForeignLoad *load )
604
 
{
605
 
        VipsForeignLoadPng *png = (VipsForeignLoadPng *) load;
606
 
 
607
 
        if( vips__png_read( png-&gt;filename, load-&gt;real ) )
608
 
                return( -1 );
609
 
 
610
 
        return( 0 );
611
 
}
612
 
 
613
 
static void
614
 
vips_foreign_load_png_class_init( VipsForeignLoadPngClass *class )
615
 
{
616
 
        GObjectClass *gobject_class = G_OBJECT_CLASS( class );
617
 
        VipsObjectClass *object_class = (VipsObjectClass *) class;
618
 
        VipsForeignClass *foreign_class = (VipsForeignClass *) class;
619
 
        VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class;
620
 
 
621
 
        gobject_class-&gt;set_property = vips_object_set_property;
622
 
        gobject_class-&gt;get_property = vips_object_get_property;
623
 
 
624
 
        object_class-&gt;nickname = "pngload";
625
 
        object_class-&gt;description = _( "load png from file" );
626
 
 
627
 
        foreign_class-&gt;suffs = vips__png_suffs;
628
 
 
629
 
        load_class-&gt;is_a = vips__png_ispng;
630
 
        load_class-&gt;get_flags_filename = 
631
 
                vips_foreign_load_png_get_flags_filename;
632
 
        load_class-&gt;get_flags = vips_foreign_load_png_get_flags;
633
 
        load_class-&gt;header = vips_foreign_load_png_header;
634
 
        load_class-&gt;load = vips_foreign_load_png_load;
635
 
 
636
 
        VIPS_ARG_STRING( class, "filename", 1, 
637
 
                _( "Filename" ),
638
 
                _( "Filename to load from" ),
639
 
                VIPS_ARGUMENT_REQUIRED_INPUT, 
640
 
                G_STRUCT_OFFSET( VipsForeignLoadPng, filename ),
641
 
                NULL );
642
 
}
643
 
 
644
 
static void
645
 
vips_foreign_load_png_init( VipsForeignLoadPng *png )
646
 
{
647
 
}
648
 
</pre></div>
649
 
<p>
650
 
</p>
651
 
</div>
652
 
<hr>
653
 
<div class="refsect2">
654
 
<a name="vips-foreign-find-load"></a><h3>vips_foreign_find_load ()</h3>
655
 
<pre class="programlisting">const <span class="returnvalue">char</span> *        vips_foreign_find_load              (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre>
656
 
<p>
657
 
Searches for an operation you could use to load <em class="parameter"><code>filename</code></em>. 
658
 
</p>
659
 
<p>
660
 
See also: <code class="function">vips_foreign_read()</code>.
661
 
</p>
662
 
<div class="variablelist"><table border="0" class="variablelist">
663
 
<colgroup>
664
 
<col align="left" valign="top">
665
 
<col>
666
 
</colgroup>
667
 
<tbody>
668
 
<tr>
669
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
670
 
<td>file to find a loader for</td>
671
 
</tr>
672
 
<tr>
673
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
674
 
<td>the name of an operation on success, <code class="literal">NULL</code> on error</td>
675
 
</tr>
676
 
</tbody>
677
 
</table></div>
678
 
</div>
679
 
<hr>
680
 
<div class="refsect2">
681
 
<a name="vips-foreign-find-load-options"></a><h3>vips_foreign_find_load_options ()</h3>
682
 
<pre class="programlisting">const <span class="returnvalue">char</span> *        vips_foreign_find_load_options      (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre>
683
 
<p>
684
 
Searches for an operation you could use to load <em class="parameter"><code>filename</code></em>. 
685
 
</p>
686
 
<p>
687
 
Arguments to the loader may be embedded in the filename using the usual
688
 
syntax.
689
 
</p>
690
 
<p>
691
 
See also: <a class="link" href="VipsForeign.html#vips-foreign-load" title="vips_foreign_load ()"><code class="function">vips_foreign_load()</code></a>.
692
 
</p>
693
 
<div class="variablelist"><table border="0" class="variablelist">
694
 
<colgroup>
695
 
<col align="left" valign="top">
696
 
<col>
697
 
</colgroup>
698
 
<tbody>
699
 
<tr>
700
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
701
 
<td>file to find a loader for</td>
702
 
</tr>
703
 
<tr>
704
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
705
 
<td>0 on success, -1 on error</td>
706
 
</tr>
707
 
</tbody>
708
 
</table></div>
709
 
</div>
710
 
<hr>
711
 
<div class="refsect2">
712
 
<a name="vips-foreign-flags"></a><h3>vips_foreign_flags ()</h3>
713
 
<pre class="programlisting"><a class="link" href="VipsForeign.html#VipsForeignFlags" title="enum VipsForeignFlags"><span class="returnvalue">VipsForeignFlags</span></a>    vips_foreign_flags                  (<em class="parameter"><code>const <span class="type">char</span> *loader</code></em>,
714
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre>
715
 
<p>
716
 
Return the flags for <em class="parameter"><code>filename</code></em> using <em class="parameter"><code>loader</code></em>. 
717
 
<em class="parameter"><code>loader</code></em> is something like "tiffload" or "VipsForeignLoadTiff".
718
 
</p>
719
 
<div class="variablelist"><table border="0" class="variablelist">
720
 
<colgroup>
721
 
<col align="left" valign="top">
722
 
<col>
723
 
</colgroup>
724
 
<tbody>
725
 
<tr>
726
 
<td><p><span class="term"><em class="parameter"><code>loader</code></em> :</span></p></td>
727
 
<td>name of loader to use for test</td>
728
 
</tr>
729
 
<tr>
730
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
731
 
<td>file to test</td>
732
 
</tr>
733
 
<tr>
734
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
735
 
<td>the flags for <em class="parameter"><code>filename</code></em>.</td>
736
 
</tr>
737
 
</tbody>
738
 
</table></div>
739
 
</div>
740
 
<hr>
741
 
<div class="refsect2">
742
 
<a name="vips-foreign-is-a"></a><h3>vips_foreign_is_a ()</h3>
743
 
<pre class="programlisting"><span class="returnvalue">gboolean</span>            vips_foreign_is_a                   (<em class="parameter"><code>const <span class="type">char</span> *loader</code></em>,
744
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre>
745
 
<p>
746
 
Return <code class="literal">TRUE</code> if <em class="parameter"><code>filename</code></em> can be loaded by <em class="parameter"><code>loader</code></em>. <em class="parameter"><code>loader</code></em> is something
747
 
like "tiffload" or "VipsForeignLoadTiff".
748
 
</p>
749
 
<div class="variablelist"><table border="0" class="variablelist">
750
 
<colgroup>
751
 
<col align="left" valign="top">
752
 
<col>
753
 
</colgroup>
754
 
<tbody>
755
 
<tr>
756
 
<td><p><span class="term"><em class="parameter"><code>loader</code></em> :</span></p></td>
757
 
<td>name of loader to use for test</td>
758
 
</tr>
759
 
<tr>
760
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
761
 
<td>file to test</td>
762
 
</tr>
763
 
<tr>
764
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
765
 
<td>
766
 
<code class="literal">TRUE</code> if <em class="parameter"><code>filename</code></em> can be loaded by <em class="parameter"><code>loader</code></em>.</td>
767
 
</tr>
768
 
</tbody>
769
 
</table></div>
770
 
</div>
771
 
<hr>
772
 
<div class="refsect2">
773
 
<a name="VipsSaveable"></a><h3>enum VipsSaveable</h3>
774
 
<pre class="programlisting">typedef enum {
775
 
        VIPS_SAVEABLE_MONO,
776
 
        VIPS_SAVEABLE_RGB,
777
 
        VIPS_SAVEABLE_RGBA,
778
 
        VIPS_SAVEABLE_RGB_CMYK,
779
 
        VIPS_SAVEABLE_ANY,
780
 
        VIPS_SAVEABLE_LAST
781
 
} VipsSaveable;
782
 
</pre>
783
 
<p>
784
 
See also: <a class="link" href="VipsForeign.html#VipsForeignSave"><span class="type">VipsForeignSave</span></a>.
785
 
</p>
786
 
<div class="variablelist"><table border="0" class="variablelist">
787
 
<colgroup>
788
 
<col align="left" valign="top">
789
 
<col>
790
 
</colgroup>
791
 
<tbody>
792
 
<tr>
793
 
<td><p><a name="VIPS-SAVEABLE-MONO:CAPS"></a><span class="term"><code class="literal">VIPS_SAVEABLE_MONO</code></span></p></td>
794
 
<td>1 band (eg. CSV)
795
 
</td>
796
 
</tr>
797
 
<tr>
798
 
<td><p><a name="VIPS-SAVEABLE-RGB:CAPS"></a><span class="term"><code class="literal">VIPS_SAVEABLE_RGB</code></span></p></td>
799
 
<td>1 or 3 bands (eg. PPM) 
800
 
</td>
801
 
</tr>
802
 
<tr>
803
 
<td><p><a name="VIPS-SAVEABLE-RGBA:CAPS"></a><span class="term"><code class="literal">VIPS_SAVEABLE_RGBA</code></span></p></td>
804
 
<td>1, 2, 3 or 4 bands (eg. PNG)
805
 
</td>
806
 
</tr>
807
 
<tr>
808
 
<td><p><a name="VIPS-SAVEABLE-RGB-CMYK:CAPS"></a><span class="term"><code class="literal">VIPS_SAVEABLE_RGB_CMYK</code></span></p></td>
809
 
<td>1, 3 or 4 bands (eg. JPEG)
810
 
</td>
811
 
</tr>
812
 
<tr>
813
 
<td><p><a name="VIPS-SAVEABLE-ANY:CAPS"></a><span class="term"><code class="literal">VIPS_SAVEABLE_ANY</code></span></p></td>
814
 
<td>any number of bands (eg. TIFF)
815
 
</td>
816
 
</tr>
817
 
<tr>
818
 
<td><p><a name="VIPS-SAVEABLE-LAST:CAPS"></a><span class="term"><code class="literal">VIPS_SAVEABLE_LAST</code></span></p></td>
819
 
<td>
820
 
</td>
821
 
</tr>
822
 
</tbody>
823
 
</table></div>
824
 
</div>
825
 
<hr>
826
 
<div class="refsect2">
827
 
<a name="VipsForeignSave-struct"></a><h3>VipsForeignSave</h3>
828
 
<pre class="programlisting">typedef struct {
829
 
        /* The image we are to save, as supplied by our caller. 
830
 
         */
831
 
        VipsImage *in;
832
 
 
833
 
        /* @in converted to a saveable format (eg. 8-bit RGB) according to the
834
 
         * instructions you give in the class fields below.
835
 
         *
836
 
         * This is the image you should actually write to the output.
837
 
         */
838
 
        VipsImage *ready;
839
 
} VipsForeignSave;
840
 
</pre>
841
 
<p>
842
 
</p>
843
 
</div>
844
 
<hr>
845
 
<div class="refsect2">
846
 
<a name="VipsForeignSaveClass"></a><h3>VipsForeignSaveClass</h3>
847
 
<pre class="programlisting">typedef struct {
848
 
        VipsForeignClass parent_class;
849
 
 
850
 
 
851
 
        /* How this format treats bands.
852
 
         *
853
 
         * @saveable describes the bands that your saver can handle. For 
854
 
         * example, PPM images can have 1 or 3 bands (mono or RGB), so it 
855
 
         * uses #VIPS_SAVEABLE_RGB.
856
 
         */
857
 
        VipsSaveable saveable;
858
 
 
859
 
        /* How this format treats band formats.
860
 
         *
861
 
         * @format_table describes the band formats that your saver can 
862
 
         * handle. For each of the 10 #VipsBandFormat values, the array 
863
 
         * should give the format your saver will accept. 
864
 
         */
865
 
        VipsBandFormat *format_table;
866
 
 
867
 
        /* The set of coding types this format can save. For example, jpeg can
868
 
         * only save NONE, so has NONE TRUE and RAD and LABQ FALSE.
869
 
         *
870
 
         * Default NONE TRUE, RAD and LABQ FALSE.
871
 
         */
872
 
        gboolean coding[VIPS_CODING_LAST];
873
 
} VipsForeignSaveClass;
874
 
</pre>
875
 
<p>
876
 
Call your saver in the class' <em class="parameter"><code><code class="function">build()</code></code></em> method after chaining up. The
877
 
prepared image should be ready for you to save in <em class="parameter"><code>ready</code></em>.  
878
 
</p>
879
 
<p>
880
 
As a complete example, here's the code for the CSV saver, minus the calls
881
 
to the actual save routines.
882
 
</p>
883
 
<p>
884
 
</p>
885
 
<div class="informalexample"><pre class="programlisting">
886
 
typedef struct _VipsForeignSaveCsv {
887
 
        VipsForeignSave parent_object;
888
 
 
889
 
        char *filename; 
890
 
        const char *separator;
891
 
} VipsForeignSaveCsv;
892
 
 
893
 
typedef VipsForeignSaveClass VipsForeignSaveCsvClass;
894
 
 
895
 
G_DEFINE_TYPE( VipsForeignSaveCsv, vips_foreign_save_csv, 
896
 
        VIPS_TYPE_FOREIGN_SAVE );
897
 
 
898
 
static int
899
 
vips_foreign_save_csv_build( VipsObject *object )
900
 
{
901
 
        VipsForeignSave *save = (VipsForeignSave *) object;
902
 
        VipsForeignSaveCsv *csv = (VipsForeignSaveCsv *) object;
903
 
 
904
 
        if( VIPS_OBJECT_CLASS( vips_foreign_save_csv_parent_class )-&gt;
905
 
                build( object ) )
906
 
                return( -1 );
907
 
 
908
 
        if( vips__csv_write( save-&gt;ready, csv-&gt;filename, csv-&gt;separator ) )
909
 
                return( -1 );
910
 
 
911
 
        return( 0 );
912
 
}
913
 
 
914
 
static void
915
 
vips_foreign_save_csv_class_init( VipsForeignSaveCsvClass *class )
916
 
{
917
 
        GObjectClass *gobject_class = G_OBJECT_CLASS( class );
918
 
        VipsObjectClass *object_class = (VipsObjectClass *) class;
919
 
        VipsForeignClass *foreign_class = (VipsForeignClass *) class;
920
 
        VipsForeignSaveClass *save_class = (VipsForeignSaveClass *) class;
921
 
 
922
 
        gobject_class-&gt;set_property = vips_object_set_property;
923
 
        gobject_class-&gt;get_property = vips_object_get_property;
924
 
 
925
 
        object_class-&gt;nickname = "csvsave";
926
 
        object_class-&gt;description = _( "save image to csv file" );
927
 
        object_class-&gt;build = vips_foreign_save_csv_build;
928
 
 
929
 
        foreign_class-&gt;suffs = vips__foreign_csv_suffs;
930
 
 
931
 
        save_class-&gt;saveable = VIPS_SAVEABLE_MONO;
932
 
        // no need to define -&gt;format_table, we don't want the input 
933
 
        // cast for us
934
 
 
935
 
        VIPS_ARG_STRING( class, "filename", 1, 
936
 
                _( "Filename" ),
937
 
                _( "Filename to save to" ),
938
 
                VIPS_ARGUMENT_REQUIRED_INPUT, 
939
 
                G_STRUCT_OFFSET( VipsForeignSaveCsv, filename ),
940
 
                NULL );
941
 
 
942
 
        VIPS_ARG_STRING( class, "separator", 13, 
943
 
                _( "Separator" ), 
944
 
                _( "Separator characters" ),
945
 
                VIPS_ARGUMENT_OPTIONAL_INPUT,
946
 
                G_STRUCT_OFFSET( VipsForeignSaveCsv, separator ),
947
 
                "\t" ); 
948
 
}
949
 
 
950
 
static void
951
 
vips_foreign_save_csv_init( VipsForeignSaveCsv *csv )
952
 
{
953
 
        csv-&gt;separator = g_strdup( "\t" );
954
 
}
955
 
</pre></div>
956
 
<p>
957
 
</p>
958
 
</div>
959
 
<hr>
960
 
<div class="refsect2">
961
 
<a name="vips-foreign-find-save"></a><h3>vips_foreign_find_save ()</h3>
962
 
<pre class="programlisting">const <span class="returnvalue">char</span> *        vips_foreign_find_save              (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre>
963
 
<p>
964
 
Searches for an operation you could use to write to <em class="parameter"><code>filename</code></em>.
965
 
</p>
966
 
<p>
967
 
<em class="parameter"><code>filename</code></em> may not contain embedded options. See
968
 
<a class="link" href="VipsForeign.html#vips-foreign-find-save-options" title="vips_foreign_find_save_options ()"><code class="function">vips_foreign_find_save_options()</code></a> if your filename may have options in.
969
 
</p>
970
 
<p>
971
 
See also: <code class="function">vips_foreign_write()</code>.
972
 
</p>
973
 
<div class="variablelist"><table border="0" class="variablelist">
974
 
<colgroup>
975
 
<col align="left" valign="top">
976
 
<col>
977
 
</colgroup>
978
 
<tbody>
979
 
<tr>
980
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
981
 
<td>name to find a saver for</td>
982
 
</tr>
983
 
<tr>
984
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
985
 
<td>the name of an operation on success, <code class="literal">NULL</code> on error</td>
986
 
</tr>
987
 
</tbody>
988
 
</table></div>
989
 
</div>
990
 
<hr>
991
 
<div class="refsect2">
992
 
<a name="vips-foreign-find-save-options"></a><h3>vips_foreign_find_save_options ()</h3>
993
 
<pre class="programlisting">const <span class="returnvalue">char</span> *        vips_foreign_find_save_options      (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre>
994
 
<p>
995
 
Searches for an operation you could use to write to <em class="parameter"><code>filename</code></em>.
996
 
</p>
997
 
<p>
998
 
<em class="parameter"><code>filename</code></em> may contain embedded options. See
999
 
<a class="link" href="VipsForeign.html#vips-foreign-find-save" title="vips_foreign_find_save ()"><code class="function">vips_foreign_find_save()</code></a> if your filename does not options in.
1000
 
</p>
1001
 
<p>
1002
 
See also: <code class="function">vips_foreign_write()</code>.
1003
 
</p>
1004
 
<div class="variablelist"><table border="0" class="variablelist">
1005
 
<colgroup>
1006
 
<col align="left" valign="top">
1007
 
<col>
1008
 
</colgroup>
1009
 
<tbody>
1010
 
<tr>
1011
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
1012
 
<td>name to find a saver for</td>
1013
 
</tr>
1014
 
<tr>
1015
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1016
 
<td>0 on success, -1 on error</td>
1017
 
</tr>
1018
 
</tbody>
1019
 
</table></div>
1020
 
</div>
1021
 
<hr>
1022
 
<div class="refsect2">
1023
 
<a name="vips-foreign-load"></a><h3>vips_foreign_load ()</h3>
1024
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_foreign_load                   (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
1025
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
1026
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1027
 
<p>
1028
 
Loads <em class="parameter"><code>filename</code></em> into <em class="parameter"><code>out</code></em> using the loader recommended by
1029
 
<a class="link" href="VipsForeign.html#vips-foreign-find-load" title="vips_foreign_find_load ()"><code class="function">vips_foreign_find_load()</code></a>.
1030
 
</p>
1031
 
<p>
1032
 
See also: <a class="link" href="VipsForeign.html#vips-foreign-save" title="vips_foreign_save ()"><code class="function">vips_foreign_save()</code></a>, <a class="link" href="VipsForeign.html#vips-foreign-load-options" title="vips_foreign_load_options ()"><code class="function">vips_foreign_load_options()</code></a>.
1033
 
</p>
1034
 
<div class="variablelist"><table border="0" class="variablelist">
1035
 
<colgroup>
1036
 
<col align="left" valign="top">
1037
 
<col>
1038
 
</colgroup>
1039
 
<tbody>
1040
 
<tr>
1041
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
1042
 
<td>file to load</td>
1043
 
</tr>
1044
 
<tr>
1045
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
1046
 
<td>output image</td>
1047
 
</tr>
1048
 
<tr>
1049
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1050
 
<td>
1051
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1052
 
</tr>
1053
 
<tr>
1054
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1055
 
<td>0 on success, -1 on error</td>
1056
 
</tr>
1057
 
</tbody>
1058
 
</table></div>
1059
 
</div>
1060
 
<hr>
1061
 
<div class="refsect2">
1062
 
<a name="vips-foreign-save"></a><h3>vips_foreign_save ()</h3>
1063
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_foreign_save                   (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
1064
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
1065
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1066
 
<p>
1067
 
Saves <em class="parameter"><code>in</code></em> to <em class="parameter"><code>filename</code></em> using the saver recommended by
1068
 
<a class="link" href="VipsForeign.html#vips-foreign-find-save" title="vips_foreign_find_save ()"><code class="function">vips_foreign_find_save()</code></a>. Options are not in <em class="parameter"><code>filename</code></em> but must be given
1069
 
as a NULL-terminated list of name-value pairs.
1070
 
</p>
1071
 
<p>
1072
 
See also: <a class="link" href="VipsForeign.html#vips-foreign-load" title="vips_foreign_load ()"><code class="function">vips_foreign_load()</code></a>.
1073
 
</p>
1074
 
<div class="variablelist"><table border="0" class="variablelist">
1075
 
<colgroup>
1076
 
<col align="left" valign="top">
1077
 
<col>
1078
 
</colgroup>
1079
 
<tbody>
1080
 
<tr>
1081
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
1082
 
<td>image to write</td>
1083
 
</tr>
1084
 
<tr>
1085
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
1086
 
<td>file to write to</td>
1087
 
</tr>
1088
 
<tr>
1089
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1090
 
<td>
1091
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1092
 
</tr>
1093
 
<tr>
1094
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1095
 
<td>0 on success, -1 on error</td>
1096
 
</tr>
1097
 
</tbody>
1098
 
</table></div>
1099
 
</div>
1100
 
<hr>
1101
 
<div class="refsect2">
1102
 
<a name="vips-foreign-load-options"></a><h3>vips_foreign_load_options ()</h3>
1103
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_foreign_load_options           (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
1104
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
1105
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1106
 
<p>
1107
 
Loads <em class="parameter"><code>filename</code></em> into <em class="parameter"><code>out</code></em> using the loader recommended by
1108
 
<a class="link" href="VipsForeign.html#vips-foreign-find-load" title="vips_foreign_find_load ()"><code class="function">vips_foreign_find_load()</code></a>.
1109
 
</p>
1110
 
<p>
1111
 
Arguments to the loader may be embedded in the filename using the usual
1112
 
syntax. They may also be given as a set of NULL-terminated optional
1113
 
arguments.
1114
 
</p>
1115
 
<p>
1116
 
See also: <a class="link" href="VipsForeign.html#vips-foreign-load" title="vips_foreign_load ()"><code class="function">vips_foreign_load()</code></a>.
1117
 
</p>
1118
 
<div class="variablelist"><table border="0" class="variablelist">
1119
 
<colgroup>
1120
 
<col align="left" valign="top">
1121
 
<col>
1122
 
</colgroup>
1123
 
<tbody>
1124
 
<tr>
1125
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
1126
 
<td>file to load</td>
1127
 
</tr>
1128
 
<tr>
1129
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
1130
 
<td>output image</td>
1131
 
</tr>
1132
 
<tr>
1133
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1134
 
<td>
1135
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1136
 
</tr>
1137
 
<tr>
1138
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1139
 
<td>0 on success, -1 on error</td>
1140
 
</tr>
1141
 
</tbody>
1142
 
</table></div>
1143
 
</div>
1144
 
<hr>
1145
 
<div class="refsect2">
1146
 
<a name="vips-foreign-save-options"></a><h3>vips_foreign_save_options ()</h3>
1147
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_foreign_save_options           (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
1148
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
1149
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1150
 
<p>
1151
 
Saves <em class="parameter"><code>in</code></em> to <em class="parameter"><code>filename</code></em> using the saver recommended by
1152
 
<a class="link" href="VipsForeign.html#vips-foreign-find-save" title="vips_foreign_find_save ()"><code class="function">vips_foreign_find_save()</code></a>. 
1153
 
</p>
1154
 
<p>
1155
 
Arguments to the saver may be embedded in the filename using the usual
1156
 
syntax. They may also be given as a set of NULL-terminated optional
1157
 
arguments.
1158
 
</p>
1159
 
<p>
1160
 
See also: <a class="link" href="VipsForeign.html#vips-foreign-save" title="vips_foreign_save ()"><code class="function">vips_foreign_save()</code></a>.
1161
 
</p>
1162
 
<div class="variablelist"><table border="0" class="variablelist">
1163
 
<colgroup>
1164
 
<col align="left" valign="top">
1165
 
<col>
1166
 
</colgroup>
1167
 
<tbody>
1168
 
<tr>
1169
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
1170
 
<td>image to write</td>
1171
 
</tr>
1172
 
<tr>
1173
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
1174
 
<td>file to write to</td>
1175
 
</tr>
1176
 
<tr>
1177
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1178
 
<td>
1179
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1180
 
</tr>
1181
 
<tr>
1182
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1183
 
<td>0 on success, -1 on error</td>
1184
 
</tr>
1185
 
</tbody>
1186
 
</table></div>
1187
 
</div>
1188
 
<hr>
1189
 
<div class="refsect2">
1190
 
<a name="vips-openslideload"></a><h3>vips_openslideload ()</h3>
1191
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_openslideload                  (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
1192
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
1193
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1194
 
<p>
1195
 
Optional arguments:
1196
 
</p>
1197
 
<p>
1198
 
<em class="parameter"><code>layer</code></em>: load this layer
1199
 
<em class="parameter"><code>associated</code></em>: load this associated image
1200
 
</p>
1201
 
<p>
1202
 
Read a virtual slide supported by the OpenSlide library into a VIPS image.
1203
 
OpenSlide supports images in Aperio, Hamamatsu VMS, Hamamatsu VMU, MIRAX,
1204
 
and Trestle formats.  
1205
 
</p>
1206
 
<p>
1207
 
To facilitate zooming, virtual slide formats include multiple scaled-down
1208
 
versions of the high-resolution image.  These are typically called
1209
 
"levels", though OpenSlide and <code class="function">im_openslide2vips()</code> call them "layers".
1210
 
By default, <a class="link" href="VipsForeign.html#vips-openslideload" title="vips_openslideload ()"><code class="function">vips_openslideload()</code></a> reads the highest-resolution layer
1211
 
(layer 0).  Set <em class="parameter"><code>layer</code></em> to the layer number you want.
1212
 
</p>
1213
 
<p>
1214
 
In addition to the slide image itself, virtual slide formats sometimes
1215
 
include additional images, such as a scan of the slide's barcode.
1216
 
OpenSlide calls these "associated images".  To read an associated image,
1217
 
set <em class="parameter"><code>associated</code></em> to the image's name.
1218
 
A slide's associated images are listed in the
1219
 
"slide-associated-images" metadata item.
1220
 
</p>
1221
 
<p>
1222
 
The output of this operator is in pre-multipled ARGB format. Use
1223
 
<code class="function">im_argb2rgba()</code> to decode to png-style RGBA. 
1224
 
</p>
1225
 
<p>
1226
 
See also: <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a>.
1227
 
</p>
1228
 
<div class="variablelist"><table border="0" class="variablelist">
1229
 
<colgroup>
1230
 
<col align="left" valign="top">
1231
 
<col>
1232
 
</colgroup>
1233
 
<tbody>
1234
 
<tr>
1235
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
1236
 
<td>file to load</td>
1237
 
</tr>
1238
 
<tr>
1239
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
1240
 
<td>decompressed image</td>
1241
 
</tr>
1242
 
<tr>
1243
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1244
 
<td>
1245
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1246
 
</tr>
1247
 
<tr>
1248
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1249
 
<td>0 on success, -1 on error.</td>
1250
 
</tr>
1251
 
</tbody>
1252
 
</table></div>
1253
 
</div>
1254
 
<hr>
1255
 
<div class="refsect2">
1256
 
<a name="vips-jpegload"></a><h3>vips_jpegload ()</h3>
1257
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_jpegload                       (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
1258
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
1259
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1260
 
<p>
1261
 
Optional arguments:
1262
 
</p>
1263
 
<p>
1264
 
<em class="parameter"><code>shrink</code></em>: shrink by this much on load
1265
 
<em class="parameter"><code>fail</code></em>: fail on warnings
1266
 
</p>
1267
 
<p>
1268
 
Read a JPEG file into a VIPS image. It can read most 8-bit JPEG images, 
1269
 
including CMYK and YCbCr.
1270
 
</p>
1271
 
<p>
1272
 
<em class="parameter"><code>shrink</code></em> means shrink by this integer factor during load.  Possible values 
1273
 
are 1, 2, 4 and 8. Shrinking during read is very much faster than 
1274
 
decompressing the whole image and then shrinking later.
1275
 
</p>
1276
 
<p>
1277
 
Setting <em class="parameter"><code>fail</code></em> to true makes the JPEG reader fail on any warnings. 
1278
 
This can be useful for detecting truncated files, for example. Normally 
1279
 
reading these produces a warning, but no fatal error.  
1280
 
</p>
1281
 
<p>
1282
 
Example:
1283
 
</p>
1284
 
<p>
1285
 
</p>
1286
 
<div class="informalexample"><pre class="programlisting">
1287
 
vips_jpegload( "fred.jpg", &amp;out,
1288
 
        "shrink", 8,
1289
 
        "fail", TRUE,
1290
 
        NULL );
1291
 
</pre></div>
1292
 
<p>
1293
 
</p>
1294
 
<p>
1295
 
Any embedded ICC profiles are ignored: you always just get the RGB from 
1296
 
the file. Instead, the embedded profile will be attached to the image as 
1297
 
<em class="parameter"><code>VIPS_META_ICC_NAME</code></em> ("icc-profile-data"). You need to use something like 
1298
 
<a class="link" href="libvips-colour.html#vips-icc-import" title="vips_icc_import ()"><code class="function">vips_icc_import()</code></a> to get CIE values from the file. 
1299
 
</p>
1300
 
<p>
1301
 
EXIF metadata is attached as <em class="parameter"><code>VIPS_META_EXIF_NAME</code></em> ("exif-data"), IPCT as
1302
 
<em class="parameter"><code>VIPS_META_IPCT_NAME</code></em> ("ipct-data"), and XMP as VIPS_META_XMP_NAME
1303
 
("xmp-data").
1304
 
</p>
1305
 
<p>
1306
 
The int metadata item "jpeg-multiscan" is set to the result of 
1307
 
<code class="function">jpeg_has_multiple_scans()</code>. Interlaced jpeg images need a large amount of
1308
 
memory to load, so this field gives callers a chance to handle these
1309
 
images differently.
1310
 
</p>
1311
 
<p>
1312
 
The EXIF thumbnail, if present, is attached to the image as 
1313
 
"jpeg-thumbnail-data". See <a class="link" href="libvips-header.html#vips-image-get-blob" title="vips_image_get_blob ()"><code class="function">vips_image_get_blob()</code></a>.
1314
 
</p>
1315
 
<p>
1316
 
This function only reads the image header and does not decompress any pixel
1317
 
data. Decompression only occurs when pixels are accessed by some other
1318
 
function.
1319
 
</p>
1320
 
<p>
1321
 
See also: <a class="link" href="VipsForeign.html#vips-jpegload-buffer" title="vips_jpegload_buffer ()"><code class="function">vips_jpegload_buffer()</code></a>, <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a>.
1322
 
</p>
1323
 
<div class="variablelist"><table border="0" class="variablelist">
1324
 
<colgroup>
1325
 
<col align="left" valign="top">
1326
 
<col>
1327
 
</colgroup>
1328
 
<tbody>
1329
 
<tr>
1330
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
1331
 
<td>file to load</td>
1332
 
</tr>
1333
 
<tr>
1334
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
1335
 
<td>decompressed image</td>
1336
 
</tr>
1337
 
<tr>
1338
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1339
 
<td>
1340
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1341
 
</tr>
1342
 
<tr>
1343
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1344
 
<td>0 on success, -1 on error.</td>
1345
 
</tr>
1346
 
</tbody>
1347
 
</table></div>
1348
 
</div>
1349
 
<hr>
1350
 
<div class="refsect2">
1351
 
<a name="vips-jpegload-buffer"></a><h3>vips_jpegload_buffer ()</h3>
1352
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_jpegload_buffer                (<em class="parameter"><code><span class="type">void</span> *buf</code></em>,
1353
 
                                                         <em class="parameter"><code><span class="type">size_t</span> len</code></em>,
1354
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
1355
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1356
 
<p>
1357
 
Read a JPEG-formatted memory block into a VIPS image. It can read most 
1358
 
8-bit JPEG images, including CMYK and YCbCr.
1359
 
</p>
1360
 
<p>
1361
 
This function is handy for processing JPEG image thumbnails.
1362
 
</p>
1363
 
<p>
1364
 
Caution: on return only the header will have been read, the pixel data is
1365
 
not decompressed until the first pixel is read. Therefore you must not free
1366
 
<em class="parameter"><code>buf</code></em> until you have read pixel data from <em class="parameter"><code>out</code></em>.
1367
 
</p>
1368
 
<p>
1369
 
See also: <a class="link" href="VipsForeign.html#vips-jpegload" title="vips_jpegload ()"><code class="function">vips_jpegload()</code></a>.
1370
 
</p>
1371
 
<div class="variablelist"><table border="0" class="variablelist">
1372
 
<colgroup>
1373
 
<col align="left" valign="top">
1374
 
<col>
1375
 
</colgroup>
1376
 
<tbody>
1377
 
<tr>
1378
 
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
1379
 
<td>memory area to load</td>
1380
 
</tr>
1381
 
<tr>
1382
 
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
1383
 
<td>size of memory area</td>
1384
 
</tr>
1385
 
<tr>
1386
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
1387
 
<td>image to write</td>
1388
 
</tr>
1389
 
<tr>
1390
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1391
 
<td>
1392
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1393
 
</tr>
1394
 
<tr>
1395
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1396
 
<td>0 on success, -1 on error.</td>
1397
 
</tr>
1398
 
</tbody>
1399
 
</table></div>
1400
 
</div>
1401
 
<hr>
1402
 
<div class="refsect2">
1403
 
<a name="vips-jpegsave"></a><h3>vips_jpegsave ()</h3>
1404
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_jpegsave                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
1405
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
1406
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1407
 
<p>
1408
 
Optional arguments:
1409
 
</p>
1410
 
<p>
1411
 
<em class="parameter"><code>Q</code></em>: quality factor
1412
 
<em class="parameter"><code>profile</code></em>: attach this ICC profile
1413
 
<em class="parameter"><code>optimize_coding</code></em>: compute optimal Huffman coding tables
1414
 
<em class="parameter"><code>interlace</code></em>: write an interlaced (progressive) jpeg
1415
 
<em class="parameter"><code>strip</code></em>: remove all metadata from image
1416
 
<em class="parameter"><code>no</code></em>-subsample: disable chroma subsampling
1417
 
</p>
1418
 
<p>
1419
 
Write a VIPS image to a file as JPEG.
1420
 
</p>
1421
 
<p>
1422
 
Use <em class="parameter"><code>Q</code></em> to set the JPEG compression factor. Default 75.
1423
 
</p>
1424
 
<p>
1425
 
Use <em class="parameter"><code>profile</code></em> to give the filename of a profile to be embedded in the JPEG.
1426
 
This does not affect the pixels which are written, just the way 
1427
 
they are tagged. You can use the special string "none" to mean 
1428
 
"don't attach a profile".
1429
 
</p>
1430
 
<p>
1431
 
If no profile is specified and the VIPS header 
1432
 
contains an ICC profile named VIPS_META_ICC_NAME ("icc-profile-data"), the
1433
 
profile from the VIPS header will be attached.
1434
 
</p>
1435
 
<p>
1436
 
The image is automatically converted to RGB, Monochrome or CMYK before 
1437
 
saving. 
1438
 
</p>
1439
 
<p>
1440
 
EXIF data is constructed from <em class="parameter"><code>VIPS_META_EXIF_NAME</code></em> ("exif-data"), then
1441
 
modified with any other related tags on the image before being written to
1442
 
the file. 
1443
 
</p>
1444
 
<p>
1445
 
IPCT as <em class="parameter"><code>VIPS_META_IPCT_NAME</code></em> ("ipct-data") and XMP as VIPS_META_XMP_NAME
1446
 
("xmp-data") are coded and attached. 
1447
 
</p>
1448
 
<p>
1449
 
If <em class="parameter"><code>optimize_coding</code></em> is set, the Huffman tables are optimised. This is
1450
 
sllightly slower and produces slightly smaller files. 
1451
 
</p>
1452
 
<p>
1453
 
If <em class="parameter"><code>interlace</code></em> is set, the jpeg files will be interlaced (progressive jpeg,
1454
 
in jpg parlance). These files may be better for display over a slow network
1455
 
conection, but need much more memory to encode and decode. 
1456
 
</p>
1457
 
<p>
1458
 
If <em class="parameter"><code>strip</code></em> is set, no EXIF data, IPCT data, ICC profile or XMP metadata is 
1459
 
written into the output file. 
1460
 
</p>
1461
 
<p>
1462
 
If <em class="parameter"><code>no</code></em>-subsample is set, chrominance subsampling is disabled. This will 
1463
 
improve quality at the cost of larger file size. Useful for high Q factors. 
1464
 
</p>
1465
 
<p>
1466
 
See also: <a class="link" href="VipsForeign.html#vips-jpegsave-buffer" title="vips_jpegsave_buffer ()"><code class="function">vips_jpegsave_buffer()</code></a>, <code class="function">vips_image_write_file()</code>.
1467
 
</p>
1468
 
<div class="variablelist"><table border="0" class="variablelist">
1469
 
<colgroup>
1470
 
<col align="left" valign="top">
1471
 
<col>
1472
 
</colgroup>
1473
 
<tbody>
1474
 
<tr>
1475
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
1476
 
<td>image to save</td>
1477
 
</tr>
1478
 
<tr>
1479
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
1480
 
<td>file to write to</td>
1481
 
</tr>
1482
 
<tr>
1483
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1484
 
<td>
1485
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1486
 
</tr>
1487
 
<tr>
1488
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1489
 
<td>0 on success, -1 on error.</td>
1490
 
</tr>
1491
 
</tbody>
1492
 
</table></div>
1493
 
</div>
1494
 
<hr>
1495
 
<div class="refsect2">
1496
 
<a name="vips-jpegsave-buffer"></a><h3>vips_jpegsave_buffer ()</h3>
1497
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_jpegsave_buffer                (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
1498
 
                                                         <em class="parameter"><code><span class="type">void</span> **buf</code></em>,
1499
 
                                                         <em class="parameter"><code><span class="type">size_t</span> *len</code></em>,
1500
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1501
 
<p>
1502
 
Optional arguments:
1503
 
</p>
1504
 
<p>
1505
 
<em class="parameter"><code>Q</code></em>: JPEG quality factor
1506
 
<em class="parameter"><code>profile</code></em>: attach this ICC profile
1507
 
<em class="parameter"><code>optimize_coding</code></em>: compute optimal Huffman coding tables
1508
 
<em class="parameter"><code>interlace</code></em>: write an interlaced (progressive) jpeg
1509
 
<em class="parameter"><code>strip</code></em>: remove all metadata from image
1510
 
<em class="parameter"><code>no</code></em>-subsample: disable chroma subsampling
1511
 
</p>
1512
 
<p>
1513
 
As <a class="link" href="VipsForeign.html#vips-jpegsave" title="vips_jpegsave ()"><code class="function">vips_jpegsave()</code></a>, but save to a memory buffer. 
1514
 
</p>
1515
 
<p>
1516
 
The address of the buffer is returned in <em class="parameter"><code>obuf</code></em>, the length of the buffer in
1517
 
<em class="parameter"><code>olen</code></em>. You are responsible for freeing the buffer with <code class="function">g_free()</code> when you
1518
 
are done with it.
1519
 
</p>
1520
 
<p>
1521
 
See also: <a class="link" href="VipsForeign.html#vips-jpegsave" title="vips_jpegsave ()"><code class="function">vips_jpegsave()</code></a>, <a class="link" href="VipsImage.html#vips-image-write-to-file" title="vips_image_write_to_file ()"><code class="function">vips_image_write_to_file()</code></a>.
1522
 
</p>
1523
 
<div class="variablelist"><table border="0" class="variablelist">
1524
 
<colgroup>
1525
 
<col align="left" valign="top">
1526
 
<col>
1527
 
</colgroup>
1528
 
<tbody>
1529
 
<tr>
1530
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
1531
 
<td>image to save</td>
1532
 
</tr>
1533
 
<tr>
1534
 
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
1535
 
<td>return output buffer here</td>
1536
 
</tr>
1537
 
<tr>
1538
 
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
1539
 
<td>return output length here</td>
1540
 
</tr>
1541
 
<tr>
1542
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1543
 
<td>
1544
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1545
 
</tr>
1546
 
<tr>
1547
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1548
 
<td>0 on success, -1 on error.</td>
1549
 
</tr>
1550
 
</tbody>
1551
 
</table></div>
1552
 
</div>
1553
 
<hr>
1554
 
<div class="refsect2">
1555
 
<a name="vips-jpegsave-mime"></a><h3>vips_jpegsave_mime ()</h3>
1556
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_jpegsave_mime                  (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
1557
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1558
 
<p>
1559
 
Optional arguments:
1560
 
</p>
1561
 
<p>
1562
 
<em class="parameter"><code>Q</code></em>: JPEG quality factor
1563
 
<em class="parameter"><code>profile</code></em>: attach this ICC profile
1564
 
<em class="parameter"><code>optimize_coding</code></em>: compute optimal Huffman coding tables
1565
 
<em class="parameter"><code>strip</code></em>: remove all metadata from image
1566
 
<em class="parameter"><code>no</code></em>-subsample: disable chroma subsampling
1567
 
</p>
1568
 
<p>
1569
 
As <a class="link" href="VipsForeign.html#vips-jpegsave" title="vips_jpegsave ()"><code class="function">vips_jpegsave()</code></a>, but save as a mime jpeg on stdout.
1570
 
</p>
1571
 
<p>
1572
 
See also: <a class="link" href="VipsForeign.html#vips-jpegsave" title="vips_jpegsave ()"><code class="function">vips_jpegsave()</code></a>, <a class="link" href="VipsImage.html#vips-image-write-to-file" title="vips_image_write_to_file ()"><code class="function">vips_image_write_to_file()</code></a>.
1573
 
</p>
1574
 
<div class="variablelist"><table border="0" class="variablelist">
1575
 
<colgroup>
1576
 
<col align="left" valign="top">
1577
 
<col>
1578
 
</colgroup>
1579
 
<tbody>
1580
 
<tr>
1581
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
1582
 
<td>image to save</td>
1583
 
</tr>
1584
 
<tr>
1585
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1586
 
<td>
1587
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1588
 
</tr>
1589
 
<tr>
1590
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1591
 
<td>0 on success, -1 on error.</td>
1592
 
</tr>
1593
 
</tbody>
1594
 
</table></div>
1595
 
</div>
1596
 
<hr>
1597
 
<div class="refsect2">
1598
 
<a name="vips-webpload"></a><h3>vips_webpload ()</h3>
1599
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_webpload                       (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
1600
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
1601
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1602
 
<p>
1603
 
Optional arguments:
1604
 
</p>
1605
 
<p>
1606
 
Read a webp file into a VIPS image. 
1607
 
</p>
1608
 
<p>
1609
 
See also:
1610
 
</p>
1611
 
<div class="variablelist"><table border="0" class="variablelist">
1612
 
<colgroup>
1613
 
<col align="left" valign="top">
1614
 
<col>
1615
 
</colgroup>
1616
 
<tbody>
1617
 
<tr>
1618
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
1619
 
<td>file to load</td>
1620
 
</tr>
1621
 
<tr>
1622
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
1623
 
<td>decompressed image</td>
1624
 
</tr>
1625
 
<tr>
1626
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1627
 
<td>
1628
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1629
 
</tr>
1630
 
<tr>
1631
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1632
 
<td>0 on success, -1 on error.</td>
1633
 
</tr>
1634
 
</tbody>
1635
 
</table></div>
1636
 
</div>
1637
 
<hr>
1638
 
<div class="refsect2">
1639
 
<a name="vips-webpload-buffer"></a><h3>vips_webpload_buffer ()</h3>
1640
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_webpload_buffer                (<em class="parameter"><code><span class="type">void</span> *buf</code></em>,
1641
 
                                                         <em class="parameter"><code><span class="type">size_t</span> len</code></em>,
1642
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
1643
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1644
 
<p>
1645
 
See also:
1646
 
</p>
1647
 
<div class="variablelist"><table border="0" class="variablelist">
1648
 
<colgroup>
1649
 
<col align="left" valign="top">
1650
 
<col>
1651
 
</colgroup>
1652
 
<tbody>
1653
 
<tr>
1654
 
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
1655
 
<td>memory area to load</td>
1656
 
</tr>
1657
 
<tr>
1658
 
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
1659
 
<td>size of memory area</td>
1660
 
</tr>
1661
 
<tr>
1662
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
1663
 
<td>image to write</td>
1664
 
</tr>
1665
 
<tr>
1666
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1667
 
<td>
1668
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1669
 
</tr>
1670
 
<tr>
1671
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1672
 
<td>0 on success, -1 on error.</td>
1673
 
</tr>
1674
 
</tbody>
1675
 
</table></div>
1676
 
</div>
1677
 
<hr>
1678
 
<div class="refsect2">
1679
 
<a name="vips-webpsave"></a><h3>vips_webpsave ()</h3>
1680
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_webpsave                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
1681
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
1682
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1683
 
<p>
1684
 
Optional arguments:
1685
 
</p>
1686
 
<p>
1687
 
<em class="parameter"><code>Q</code></em>: quality factor
1688
 
</p>
1689
 
<p>
1690
 
See also:
1691
 
</p>
1692
 
<div class="variablelist"><table border="0" class="variablelist">
1693
 
<colgroup>
1694
 
<col align="left" valign="top">
1695
 
<col>
1696
 
</colgroup>
1697
 
<tbody>
1698
 
<tr>
1699
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
1700
 
<td>image to save</td>
1701
 
</tr>
1702
 
<tr>
1703
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
1704
 
<td>file to write to</td>
1705
 
</tr>
1706
 
<tr>
1707
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1708
 
<td>
1709
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1710
 
</tr>
1711
 
<tr>
1712
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1713
 
<td>0 on success, -1 on error.</td>
1714
 
</tr>
1715
 
</tbody>
1716
 
</table></div>
1717
 
</div>
1718
 
<hr>
1719
 
<div class="refsect2">
1720
 
<a name="vips-webpsave-buffer"></a><h3>vips_webpsave_buffer ()</h3>
1721
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_webpsave_buffer                (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
1722
 
                                                         <em class="parameter"><code><span class="type">void</span> **buf</code></em>,
1723
 
                                                         <em class="parameter"><code><span class="type">size_t</span> *len</code></em>,
1724
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1725
 
<p>
1726
 
Optional arguments:
1727
 
</p>
1728
 
<p>
1729
 
<em class="parameter"><code>Q</code></em>: JPEG quality factor
1730
 
</p>
1731
 
<p>
1732
 
See also:
1733
 
</p>
1734
 
<div class="variablelist"><table border="0" class="variablelist">
1735
 
<colgroup>
1736
 
<col align="left" valign="top">
1737
 
<col>
1738
 
</colgroup>
1739
 
<tbody>
1740
 
<tr>
1741
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
1742
 
<td>image to save</td>
1743
 
</tr>
1744
 
<tr>
1745
 
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
1746
 
<td>return output buffer here</td>
1747
 
</tr>
1748
 
<tr>
1749
 
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
1750
 
<td>return output length here</td>
1751
 
</tr>
1752
 
<tr>
1753
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1754
 
<td>
1755
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1756
 
</tr>
1757
 
<tr>
1758
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1759
 
<td>0 on success, -1 on error.</td>
1760
 
</tr>
1761
 
</tbody>
1762
 
</table></div>
1763
 
</div>
1764
 
<hr>
1765
 
<div class="refsect2">
1766
 
<a name="vips-webpsave-mime"></a><h3>vips_webpsave_mime ()</h3>
1767
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_webpsave_mime                  (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
1768
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1769
 
<p>
1770
 
Optional arguments:
1771
 
</p>
1772
 
<p>
1773
 
<em class="parameter"><code>Q</code></em>: quality factor
1774
 
</p>
1775
 
<p>
1776
 
See also:
1777
 
</p>
1778
 
<div class="variablelist"><table border="0" class="variablelist">
1779
 
<colgroup>
1780
 
<col align="left" valign="top">
1781
 
<col>
1782
 
</colgroup>
1783
 
<tbody>
1784
 
<tr>
1785
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
1786
 
<td>image to save</td>
1787
 
</tr>
1788
 
<tr>
1789
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1790
 
<td>
1791
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1792
 
</tr>
1793
 
<tr>
1794
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1795
 
<td>0 on success, -1 on error.</td>
1796
 
</tr>
1797
 
</tbody>
1798
 
</table></div>
1799
 
</div>
1800
 
<hr>
1801
 
<div class="refsect2">
1802
 
<a name="VipsForeignTiffCompression"></a><h3>enum VipsForeignTiffCompression</h3>
1803
 
<pre class="programlisting">typedef enum {
1804
 
        VIPS_FOREIGN_TIFF_COMPRESSION_NONE,
1805
 
        VIPS_FOREIGN_TIFF_COMPRESSION_JPEG,
1806
 
        VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE,
1807
 
        VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS,
1808
 
        VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4,
1809
 
        VIPS_FOREIGN_TIFF_COMPRESSION_LZW,
1810
 
        VIPS_FOREIGN_TIFF_COMPRESSION_LAST
1811
 
} VipsForeignTiffCompression;
1812
 
</pre>
1813
 
<p>
1814
 
The compression types supported by the tiff writer.
1815
 
</p>
1816
 
<p>
1817
 
Use <em class="parameter"><code>Q</code></em> to set the jpeg compression level, default 75.
1818
 
</p>
1819
 
<p>
1820
 
Use <em class="parameter"><code>prediction</code></em> to set the lzw or deflate prediction, default none.
1821
 
</p>
1822
 
<div class="variablelist"><table border="0" class="variablelist">
1823
 
<colgroup>
1824
 
<col align="left" valign="top">
1825
 
<col>
1826
 
</colgroup>
1827
 
<tbody>
1828
 
<tr>
1829
 
<td><p><a name="VIPS-FOREIGN-TIFF-COMPRESSION-NONE:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_TIFF_COMPRESSION_NONE</code></span></p></td>
1830
 
<td>no compression
1831
 
</td>
1832
 
</tr>
1833
 
<tr>
1834
 
<td><p><a name="VIPS-FOREIGN-TIFF-COMPRESSION-JPEG:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_TIFF_COMPRESSION_JPEG</code></span></p></td>
1835
 
<td>jpeg compression
1836
 
</td>
1837
 
</tr>
1838
 
<tr>
1839
 
<td><p><a name="VIPS-FOREIGN-TIFF-COMPRESSION-DEFLATE:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE</code></span></p></td>
1840
 
<td>deflate (zip) compression
1841
 
</td>
1842
 
</tr>
1843
 
<tr>
1844
 
<td><p><a name="VIPS-FOREIGN-TIFF-COMPRESSION-PACKBITS:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS</code></span></p></td>
1845
 
<td>packbits compression
1846
 
</td>
1847
 
</tr>
1848
 
<tr>
1849
 
<td><p><a name="VIPS-FOREIGN-TIFF-COMPRESSION-CCITTFAX4:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4</code></span></p></td>
1850
 
<td>fax4 compression
1851
 
</td>
1852
 
</tr>
1853
 
<tr>
1854
 
<td><p><a name="VIPS-FOREIGN-TIFF-COMPRESSION-LZW:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_TIFF_COMPRESSION_LZW</code></span></p></td>
1855
 
<td>LZW compression
1856
 
</td>
1857
 
</tr>
1858
 
<tr>
1859
 
<td><p><a name="VIPS-FOREIGN-TIFF-COMPRESSION-LAST:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_TIFF_COMPRESSION_LAST</code></span></p></td>
1860
 
<td>
1861
 
</td>
1862
 
</tr>
1863
 
</tbody>
1864
 
</table></div>
1865
 
</div>
1866
 
<hr>
1867
 
<div class="refsect2">
1868
 
<a name="VipsForeignTiffPredictor"></a><h3>enum VipsForeignTiffPredictor</h3>
1869
 
<pre class="programlisting">typedef enum {
1870
 
        VIPS_FOREIGN_TIFF_PREDICTOR_NONE = 1,
1871
 
        VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL = 2,
1872
 
        VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT = 3,
1873
 
        VIPS_FOREIGN_TIFF_PREDICTOR_LAST
1874
 
} VipsForeignTiffPredictor;
1875
 
</pre>
1876
 
<p>
1877
 
The predictor can help deflate and lzw compression. The values are fixed by
1878
 
the tiff library.
1879
 
</p>
1880
 
<div class="variablelist"><table border="0" class="variablelist">
1881
 
<colgroup>
1882
 
<col align="left" valign="top">
1883
 
<col>
1884
 
</colgroup>
1885
 
<tbody>
1886
 
<tr>
1887
 
<td><p><a name="VIPS-FOREIGN-TIFF-PREDICTOR-NONE:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_TIFF_PREDICTOR_NONE</code></span></p></td>
1888
 
<td>no prediction
1889
 
</td>
1890
 
</tr>
1891
 
<tr>
1892
 
<td><p><a name="VIPS-FOREIGN-TIFF-PREDICTOR-HORIZONTAL:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL</code></span></p></td>
1893
 
<td>horizontal differencing
1894
 
</td>
1895
 
</tr>
1896
 
<tr>
1897
 
<td><p><a name="VIPS-FOREIGN-TIFF-PREDICTOR-FLOAT:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT</code></span></p></td>
1898
 
<td>float predictor
1899
 
</td>
1900
 
</tr>
1901
 
<tr>
1902
 
<td><p><a name="VIPS-FOREIGN-TIFF-PREDICTOR-LAST:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_TIFF_PREDICTOR_LAST</code></span></p></td>
1903
 
<td>
1904
 
</td>
1905
 
</tr>
1906
 
</tbody>
1907
 
</table></div>
1908
 
</div>
1909
 
<hr>
1910
 
<div class="refsect2">
1911
 
<a name="VipsForeignTiffResunit"></a><h3>enum VipsForeignTiffResunit</h3>
1912
 
<pre class="programlisting">typedef enum {
1913
 
        VIPS_FOREIGN_TIFF_RESUNIT_CM,
1914
 
        VIPS_FOREIGN_TIFF_RESUNIT_INCH,
1915
 
        VIPS_FOREIGN_TIFF_RESUNIT_LAST
1916
 
} VipsForeignTiffResunit;
1917
 
</pre>
1918
 
<p>
1919
 
Use inches or centimeters as the resolution unit for a tiff file.
1920
 
</p>
1921
 
<div class="variablelist"><table border="0" class="variablelist">
1922
 
<colgroup>
1923
 
<col align="left" valign="top">
1924
 
<col>
1925
 
</colgroup>
1926
 
<tbody>
1927
 
<tr>
1928
 
<td><p><a name="VIPS-FOREIGN-TIFF-RESUNIT-CM:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_TIFF_RESUNIT_CM</code></span></p></td>
1929
 
<td>use centimeters
1930
 
</td>
1931
 
</tr>
1932
 
<tr>
1933
 
<td><p><a name="VIPS-FOREIGN-TIFF-RESUNIT-INCH:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_TIFF_RESUNIT_INCH</code></span></p></td>
1934
 
<td>use inches
1935
 
</td>
1936
 
</tr>
1937
 
<tr>
1938
 
<td><p><a name="VIPS-FOREIGN-TIFF-RESUNIT-LAST:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_TIFF_RESUNIT_LAST</code></span></p></td>
1939
 
<td>
1940
 
</td>
1941
 
</tr>
1942
 
</tbody>
1943
 
</table></div>
1944
 
</div>
1945
 
<hr>
1946
 
<div class="refsect2">
1947
 
<a name="vips-tiffload"></a><h3>vips_tiffload ()</h3>
1948
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_tiffload                       (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
1949
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
1950
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
1951
 
<p>
1952
 
Optional arguments:
1953
 
</p>
1954
 
<p>
1955
 
<em class="parameter"><code>page</code></em>: load this page
1956
 
</p>
1957
 
<p>
1958
 
Read a TIFF file into a VIPS image. It is a full baseline TIFF 6 reader, 
1959
 
with extensions for tiled images, multipage images, LAB colour space, 
1960
 
pyramidal images and JPEG compression. including CMYK and YCbCr.
1961
 
</p>
1962
 
<p>
1963
 
<em class="parameter"><code>page</code></em> means load this page from the file. By default the first page (page
1964
 
0) is read.
1965
 
</p>
1966
 
<p>
1967
 
Any ICC profile is read and attached to the VIPS image.
1968
 
</p>
1969
 
<p>
1970
 
See also: <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a>.
1971
 
</p>
1972
 
<div class="variablelist"><table border="0" class="variablelist">
1973
 
<colgroup>
1974
 
<col align="left" valign="top">
1975
 
<col>
1976
 
</colgroup>
1977
 
<tbody>
1978
 
<tr>
1979
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
1980
 
<td>file to load</td>
1981
 
</tr>
1982
 
<tr>
1983
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
1984
 
<td>decompressed image</td>
1985
 
</tr>
1986
 
<tr>
1987
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1988
 
<td>
1989
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
1990
 
</tr>
1991
 
<tr>
1992
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1993
 
<td>0 on success, -1 on error.</td>
1994
 
</tr>
1995
 
</tbody>
1996
 
</table></div>
1997
 
</div>
1998
 
<hr>
1999
 
<div class="refsect2">
2000
 
<a name="vips-tiffsave"></a><h3>vips_tiffsave ()</h3>
2001
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_tiffsave                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
2002
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2003
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2004
 
<p>
2005
 
Optional arguments:
2006
 
</p>
2007
 
<p>
2008
 
<em class="parameter"><code>compression</code></em>; use this compression scheme
2009
 
<em class="parameter"><code>Q</code></em>: quality factor
2010
 
<em class="parameter"><code>predictor</code></em>; compress with this prediction
2011
 
<em class="parameter"><code>profile</code></em>: attach this ICC profile
2012
 
<em class="parameter"><code>tile</code></em>; set <code class="literal">TRUE</code> to write a tiled tiff
2013
 
<em class="parameter"><code>tile_width</code></em>; set tile size
2014
 
<em class="parameter"><code>tile_height</code></em>; set tile size
2015
 
<em class="parameter"><code>pyramid</code></em>; set <code class="literal">TRUE</code> to write an image pyramid
2016
 
<em class="parameter"><code>squash</code></em>; squash 8-bit images down to 1 bit
2017
 
<em class="parameter"><code>resunit</code></em>; convert resolution to pixels per inch or cm during write
2018
 
<em class="parameter"><code>xres</code></em>; horizontal resolution in pixels/mm
2019
 
<em class="parameter"><code>yres</code></em>; vertical resolution in pixels/mm
2020
 
<em class="parameter"><code>bigtiff</code></em>; write a BigTiff file
2021
 
</p>
2022
 
<p>
2023
 
Write a VIPS image to a file as TIFF.
2024
 
</p>
2025
 
<p>
2026
 
Use <em class="parameter"><code>compression</code></em> to set the tiff compression. Currently jpeg, packbits,
2027
 
fax4, lzw, none and deflate are supported. The default is no compression.
2028
 
JPEG compression is a good lossy compressor for photographs, packbits is 
2029
 
good for 1-bit images, and deflate is the best lossless compression TIFF 
2030
 
can do. LZW has patent problems and is no longer recommended.
2031
 
</p>
2032
 
<p>
2033
 
Use <em class="parameter"><code>Q</code></em> to set the JPEG compression factor. Default 75.
2034
 
</p>
2035
 
<p>
2036
 
Use <em class="parameter"><code>predictor</code></em> to set the predictor for lzw and deflate compression. 
2037
 
</p>
2038
 
<p>
2039
 
Predictor is not set by default. There are three predictor values recognised
2040
 
at the moment (2007, July): 1 is no prediction, 2 is a horizontal 
2041
 
differencing and 3 is a floating point predictor. Refer to the libtiff 
2042
 
specifications for further discussion of various predictors. In short, 
2043
 
predictor helps to better compress image, especially in case of digital 
2044
 
photos or scanned images and bit depths &gt; 8. Try it to find whether it 
2045
 
works for your images.
2046
 
</p>
2047
 
<p>
2048
 
Use <em class="parameter"><code>profile</code></em> to give the filename of a profile to be embedded in the TIFF.
2049
 
This does not affect the pixels which are written, just the way 
2050
 
they are tagged. You can use the special string "none" to mean 
2051
 
"don't attach a profile".
2052
 
</p>
2053
 
<p>
2054
 
If no profile is specified and the VIPS header 
2055
 
contains an ICC profile named VIPS_META_ICC_NAME ("icc-profile-data"), the
2056
 
profile from the VIPS header will be attached.
2057
 
</p>
2058
 
<p>
2059
 
Set <em class="parameter"><code>tile</code></em> to TRUE to write a tiled tiff.  By default tiff are written in
2060
 
strips. Use <em class="parameter"><code>tile_width</code></em> and <em class="parameter"><code>tile_height</code></em> to set the tile size. The defaiult
2061
 
is 128 by 128.
2062
 
</p>
2063
 
<p>
2064
 
Set <em class="parameter"><code>pyramid</code></em> to write the image as a set of images, one per page, of
2065
 
decreasing size. 
2066
 
</p>
2067
 
<p>
2068
 
Set <em class="parameter"><code>squash</code></em> to make 8-bit uchar images write as 1-bit TIFFs with zero
2069
 
pixels written as 0 and non-zero as 1.
2070
 
</p>
2071
 
<p>
2072
 
Use <em class="parameter"><code>resunit</code></em> to override the default resolution unit.  
2073
 
The default 
2074
 
resolution unit is taken from the header field "resolution-unit"
2075
 
(<a class="link" href="libvips-header.html#VIPS-META-RESOLUTION-UNIT:CAPS" title="VIPS_META_RESOLUTION_UNIT"><span class="type">VIPS_META_RESOLUTION_UNIT</span></a> in C). If this field is not set, then 
2076
 
VIPS defaults to cm.
2077
 
</p>
2078
 
<p>
2079
 
Use <em class="parameter"><code>xres</code></em> and <em class="parameter"><code>yres</code></em> to override the default horizontal and vertical
2080
 
resolutions. By default these values are taken from the VIPS image header. 
2081
 
libvips resolution is always in pixels per millimetre.
2082
 
</p>
2083
 
<p>
2084
 
Set <em class="parameter"><code>bigtiff</code></em> to attempt to write a bigtiff. 
2085
 
Bigtiff is a variant of the TIFF
2086
 
format that allows more than 4GB in a file.
2087
 
</p>
2088
 
<p>
2089
 
See also: <a class="link" href="VipsForeign.html#vips-tiffload" title="vips_tiffload ()"><code class="function">vips_tiffload()</code></a>, <code class="function">vips_image_write_file()</code>.
2090
 
</p>
2091
 
<div class="variablelist"><table border="0" class="variablelist">
2092
 
<colgroup>
2093
 
<col align="left" valign="top">
2094
 
<col>
2095
 
</colgroup>
2096
 
<tbody>
2097
 
<tr>
2098
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
2099
 
<td>image to save</td>
2100
 
</tr>
2101
 
<tr>
2102
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2103
 
<td>file to write to</td>
2104
 
</tr>
2105
 
<tr>
2106
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2107
 
<td>
2108
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2109
 
</tr>
2110
 
<tr>
2111
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2112
 
<td>0 on success, -1 on error.</td>
2113
 
</tr>
2114
 
</tbody>
2115
 
</table></div>
2116
 
</div>
2117
 
<hr>
2118
 
<div class="refsect2">
2119
 
<a name="vips-openexrload"></a><h3>vips_openexrload ()</h3>
2120
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_openexrload                    (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2121
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
2122
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2123
 
<p>
2124
 
Read a OpenEXR file into a VIPS image. 
2125
 
</p>
2126
 
<p>
2127
 
The reader can handle scanline and tiled OpenEXR images. It can't handle
2128
 
OpenEXR colour management, image attributes, many pixel formats, anything
2129
 
other than RGBA.
2130
 
</p>
2131
 
<p>
2132
 
This reader uses the rather limited OpenEXR C API. It should really be
2133
 
redone in C++.
2134
 
</p>
2135
 
<p>
2136
 
See also: <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a>.
2137
 
</p>
2138
 
<div class="variablelist"><table border="0" class="variablelist">
2139
 
<colgroup>
2140
 
<col align="left" valign="top">
2141
 
<col>
2142
 
</colgroup>
2143
 
<tbody>
2144
 
<tr>
2145
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2146
 
<td>file to load</td>
2147
 
</tr>
2148
 
<tr>
2149
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
2150
 
<td>decompressed image</td>
2151
 
</tr>
2152
 
<tr>
2153
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2154
 
<td>
2155
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2156
 
</tr>
2157
 
<tr>
2158
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2159
 
<td>0 on success, -1 on error.</td>
2160
 
</tr>
2161
 
</tbody>
2162
 
</table></div>
2163
 
</div>
2164
 
<hr>
2165
 
<div class="refsect2">
2166
 
<a name="vips-fitsload"></a><h3>vips_fitsload ()</h3>
2167
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_fitsload                       (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2168
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
2169
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2170
 
<p>
2171
 
Read a FITS image file into a VIPS image. 
2172
 
</p>
2173
 
<p>
2174
 
See also: <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a>.
2175
 
</p>
2176
 
<div class="variablelist"><table border="0" class="variablelist">
2177
 
<colgroup>
2178
 
<col align="left" valign="top">
2179
 
<col>
2180
 
</colgroup>
2181
 
<tbody>
2182
 
<tr>
2183
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2184
 
<td>file to load</td>
2185
 
</tr>
2186
 
<tr>
2187
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
2188
 
<td>decompressed image</td>
2189
 
</tr>
2190
 
<tr>
2191
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2192
 
<td>
2193
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2194
 
</tr>
2195
 
<tr>
2196
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2197
 
<td>0 on success, -1 on error.</td>
2198
 
</tr>
2199
 
</tbody>
2200
 
</table></div>
2201
 
</div>
2202
 
<hr>
2203
 
<div class="refsect2">
2204
 
<a name="vips-fitssave"></a><h3>vips_fitssave ()</h3>
2205
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_fitssave                       (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
2206
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2207
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2208
 
<p>
2209
 
Write a VIPS image to a file as FITS.
2210
 
</p>
2211
 
<p>
2212
 
See also: <code class="function">vips_image_write_file()</code>.
2213
 
</p>
2214
 
<div class="variablelist"><table border="0" class="variablelist">
2215
 
<colgroup>
2216
 
<col align="left" valign="top">
2217
 
<col>
2218
 
</colgroup>
2219
 
<tbody>
2220
 
<tr>
2221
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
2222
 
<td>image to save</td>
2223
 
</tr>
2224
 
<tr>
2225
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2226
 
<td>file to write to</td>
2227
 
</tr>
2228
 
<tr>
2229
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2230
 
<td>
2231
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2232
 
</tr>
2233
 
<tr>
2234
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2235
 
<td>0 on success, -1 on error.</td>
2236
 
</tr>
2237
 
</tbody>
2238
 
</table></div>
2239
 
</div>
2240
 
<hr>
2241
 
<div class="refsect2">
2242
 
<a name="vips-analyzeload"></a><h3>vips_analyzeload ()</h3>
2243
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_analyzeload                    (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2244
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
2245
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2246
 
<p>
2247
 
Load an Analyze 6.0 file. If <em class="parameter"><code>filename</code></em> is "fred.img", this will look for
2248
 
an image header called "fred.hdr" and pixel data in "fred.img". You can
2249
 
also load "fred" or "fred.hdr".
2250
 
</p>
2251
 
<p>
2252
 
Images are
2253
 
loaded lazilly and byte-swapped, if necessary. The Analyze metadata is read
2254
 
and attached.
2255
 
</p>
2256
 
<p>
2257
 
See also: <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a>.
2258
 
</p>
2259
 
<div class="variablelist"><table border="0" class="variablelist">
2260
 
<colgroup>
2261
 
<col align="left" valign="top">
2262
 
<col>
2263
 
</colgroup>
2264
 
<tbody>
2265
 
<tr>
2266
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2267
 
<td>file to load</td>
2268
 
</tr>
2269
 
<tr>
2270
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
2271
 
<td>decompressed image</td>
2272
 
</tr>
2273
 
<tr>
2274
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2275
 
<td>
2276
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2277
 
</tr>
2278
 
<tr>
2279
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2280
 
<td>0 on success, -1 on error.</td>
2281
 
</tr>
2282
 
</tbody>
2283
 
</table></div>
2284
 
</div>
2285
 
<hr>
2286
 
<div class="refsect2">
2287
 
<a name="vips-rawload"></a><h3>vips_rawload ()</h3>
2288
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_rawload                        (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2289
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
2290
 
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
2291
 
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
2292
 
                                                         <em class="parameter"><code><span class="type">int</span> bands</code></em>,
2293
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2294
 
<p>
2295
 
Optional arguments:
2296
 
</p>
2297
 
<p>
2298
 
<em class="parameter"><code>width</code></em>: width of image in pixels
2299
 
<em class="parameter"><code>height</code></em>: height of image in pixels
2300
 
<em class="parameter"><code>bands</code></em>: number of image bands
2301
 
<em class="parameter"><code>offset</code></em>: offset in bytes from start of file
2302
 
</p>
2303
 
<p>
2304
 
This operation mmaps the file, setting <em class="parameter"><code>out</code></em> so that access to that 
2305
 
image will read from the file.
2306
 
</p>
2307
 
<p>
2308
 
Use functions like <a class="link" href="libvips-conversion.html#vips-copy" title="vips_copy ()"><code class="function">vips_copy()</code></a> to set the pixel type, byte ordering 
2309
 
and so on.
2310
 
</p>
2311
 
<p>
2312
 
See also: <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a>.
2313
 
</p>
2314
 
<div class="variablelist"><table border="0" class="variablelist">
2315
 
<colgroup>
2316
 
<col align="left" valign="top">
2317
 
<col>
2318
 
</colgroup>
2319
 
<tbody>
2320
 
<tr>
2321
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2322
 
<td>file to load</td>
2323
 
</tr>
2324
 
<tr>
2325
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
2326
 
<td>output image</td>
2327
 
</tr>
2328
 
<tr>
2329
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2330
 
<td>
2331
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2332
 
</tr>
2333
 
<tr>
2334
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2335
 
<td>0 on success, -1 on error.</td>
2336
 
</tr>
2337
 
</tbody>
2338
 
</table></div>
2339
 
</div>
2340
 
<hr>
2341
 
<div class="refsect2">
2342
 
<a name="vips-rawsave"></a><h3>vips_rawsave ()</h3>
2343
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_rawsave                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
2344
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2345
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2346
 
<p>
2347
 
Writes the pixels in <em class="parameter"><code>in</code></em> to the file <em class="parameter"><code>filename</code></em> with no header or other
2348
 
metadata. 
2349
 
</p>
2350
 
<p>
2351
 
See also: <code class="function">vips_image_write_file()</code>.
2352
 
</p>
2353
 
<div class="variablelist"><table border="0" class="variablelist">
2354
 
<colgroup>
2355
 
<col align="left" valign="top">
2356
 
<col>
2357
 
</colgroup>
2358
 
<tbody>
2359
 
<tr>
2360
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
2361
 
<td>image to save</td>
2362
 
</tr>
2363
 
<tr>
2364
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2365
 
<td>file to write to</td>
2366
 
</tr>
2367
 
<tr>
2368
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2369
 
<td>
2370
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2371
 
</tr>
2372
 
<tr>
2373
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2374
 
<td>0 on success, -1 on error.</td>
2375
 
</tr>
2376
 
</tbody>
2377
 
</table></div>
2378
 
</div>
2379
 
<hr>
2380
 
<div class="refsect2">
2381
 
<a name="vips-rawsave-fd"></a><h3>vips_rawsave_fd ()</h3>
2382
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_rawsave_fd                     (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
2383
 
                                                         <em class="parameter"><code><span class="type">int</span> fd</code></em>,
2384
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2385
 
<p>
2386
 
Writes the pixels in <em class="parameter"><code>in</code></em> to the <em class="parameter"><code>fd</code></em> with no header or other
2387
 
metadata.  Handy for implementing other savers.
2388
 
</p>
2389
 
<p>
2390
 
See also: <a class="link" href="VipsForeign.html#vips-rawsave" title="vips_rawsave ()"><code class="function">vips_rawsave()</code></a>.
2391
 
</p>
2392
 
<div class="variablelist"><table border="0" class="variablelist">
2393
 
<colgroup>
2394
 
<col align="left" valign="top">
2395
 
<col>
2396
 
</colgroup>
2397
 
<tbody>
2398
 
<tr>
2399
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
2400
 
<td>image to save</td>
2401
 
</tr>
2402
 
<tr>
2403
 
<td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td>
2404
 
<td>file to write to</td>
2405
 
</tr>
2406
 
<tr>
2407
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2408
 
<td>
2409
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2410
 
</tr>
2411
 
<tr>
2412
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2413
 
<td>0 on success, -1 on error.</td>
2414
 
</tr>
2415
 
</tbody>
2416
 
</table></div>
2417
 
</div>
2418
 
<hr>
2419
 
<div class="refsect2">
2420
 
<a name="vips-csvload"></a><h3>vips_csvload ()</h3>
2421
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_csvload                        (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2422
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
2423
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2424
 
<p>
2425
 
Optional arguments:
2426
 
</p>
2427
 
<p>
2428
 
<em class="parameter"><code>skip</code></em>: skip this many lines at start of file
2429
 
<em class="parameter"><code>lines</code></em>: read this many lines from file
2430
 
<em class="parameter"><code>whitespace</code></em>: set of whitespace characters
2431
 
<em class="parameter"><code>separator</code></em>: set of separator characters
2432
 
</p>
2433
 
<p>
2434
 
Load a CSV (comma-separated values) file. The output image is always 1 
2435
 
band (monochrome), <a class="link" href="VipsImage.html#VIPS-FORMAT-DOUBLE:CAPS"><span class="type">VIPS_FORMAT_DOUBLE</span></a>. 
2436
 
</p>
2437
 
<p>
2438
 
Items in lines can be either floating point numbers in the C locale, or 
2439
 
strings enclosed in double-quotes ("), or empty.
2440
 
You can use a backslash (\) within the quotes to escape special characters,
2441
 
such as quote marks.
2442
 
</p>
2443
 
<p>
2444
 
The reader is deliberately rather fussy: it will fail if there are any 
2445
 
short lines, or if the file is too short. It will ignore lines that are 
2446
 
too long.
2447
 
</p>
2448
 
<p>
2449
 
<em class="parameter"><code>skip</code></em> sets the number of lines to skip at the start of the file. 
2450
 
Default zero.
2451
 
</p>
2452
 
<p>
2453
 
<em class="parameter"><code>lines</code></em> sets the number of lines to read from the file. Default -1, 
2454
 
meaning read all lines to end of file.
2455
 
</p>
2456
 
<p>
2457
 
<em class="parameter"><code>whitespace</code></em> sets the skippable whitespace characters. 
2458
 
Default <span class="emphasis"><em>space</em></span>.
2459
 
Whitespace characters are always run together.
2460
 
</p>
2461
 
<p>
2462
 
<em class="parameter"><code>separator</code></em> sets the characters that separate fields. 
2463
 
Default ;,<span class="emphasis"><em>tab</em></span>. Separators are never run together.
2464
 
</p>
2465
 
<p>
2466
 
See also: <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a>.
2467
 
</p>
2468
 
<div class="variablelist"><table border="0" class="variablelist">
2469
 
<colgroup>
2470
 
<col align="left" valign="top">
2471
 
<col>
2472
 
</colgroup>
2473
 
<tbody>
2474
 
<tr>
2475
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2476
 
<td>file to load</td>
2477
 
</tr>
2478
 
<tr>
2479
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
2480
 
<td>output image</td>
2481
 
</tr>
2482
 
<tr>
2483
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2484
 
<td>
2485
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2486
 
</tr>
2487
 
<tr>
2488
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2489
 
<td>0 on success, -1 on error.</td>
2490
 
</tr>
2491
 
</tbody>
2492
 
</table></div>
2493
 
</div>
2494
 
<hr>
2495
 
<div class="refsect2">
2496
 
<a name="vips-csvsave"></a><h3>vips_csvsave ()</h3>
2497
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_csvsave                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
2498
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2499
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2500
 
<p>
2501
 
Optional arguments:
2502
 
</p>
2503
 
<p>
2504
 
<em class="parameter"><code>separator</code></em>: separator string
2505
 
</p>
2506
 
<p>
2507
 
Writes the pixels in <em class="parameter"><code>in</code></em> to the <em class="parameter"><code>filename</code></em> as CSV (comma-separated values).
2508
 
The image is written
2509
 
one line of text per scanline. Complex numbers are written as 
2510
 
"(real,imaginary)" and will need extra parsing I guess. Only the first band
2511
 
is written. 
2512
 
</p>
2513
 
<p>
2514
 
<em class="parameter"><code>separator</code></em> gives the string to use to separate numbers in the output. 
2515
 
The default is "\\t" (tab).
2516
 
</p>
2517
 
<p>
2518
 
See also: <code class="function">vips_image_write_file()</code>.
2519
 
</p>
2520
 
<div class="variablelist"><table border="0" class="variablelist">
2521
 
<colgroup>
2522
 
<col align="left" valign="top">
2523
 
<col>
2524
 
</colgroup>
2525
 
<tbody>
2526
 
<tr>
2527
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
2528
 
<td>image to save</td>
2529
 
</tr>
2530
 
<tr>
2531
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2532
 
<td>file to write to</td>
2533
 
</tr>
2534
 
<tr>
2535
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2536
 
<td>
2537
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2538
 
</tr>
2539
 
<tr>
2540
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2541
 
<td>0 on success, -1 on error.</td>
2542
 
</tr>
2543
 
</tbody>
2544
 
</table></div>
2545
 
</div>
2546
 
<hr>
2547
 
<div class="refsect2">
2548
 
<a name="vips-matrixload"></a><h3>vips_matrixload ()</h3>
2549
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_matrixload                     (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2550
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
2551
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2552
 
<p>
2553
 
Reads a matrix from a file.
2554
 
</p>
2555
 
<p>
2556
 
Matrix files have a simple format that's supposed to be easy to create with
2557
 
a text editor or a spreadsheet. 
2558
 
</p>
2559
 
<p>
2560
 
The first line has four numbers for width, height, scale and
2561
 
offset (scale and offset may be omitted, in which case they default to 1.0
2562
 
and 0.0). Scale must be non-zero. Width and height must be positive
2563
 
integers. The numbers are separated by any mixture of spaces, commas, 
2564
 
tabs and quotation marks ("). The scale and offset fields may be 
2565
 
floating-point, and must use '.'
2566
 
as a decimal separator.
2567
 
</p>
2568
 
<p>
2569
 
Subsequent lines each hold one line of matrix data, with numbers again
2570
 
separated by any mixture of spaces, commas, 
2571
 
tabs and quotation marks ("). The numbers may be floating-point, and must
2572
 
use '.'
2573
 
as a decimal separator.
2574
 
</p>
2575
 
<p>
2576
 
Extra characters at the ends of lines or at the end of the file are
2577
 
ignored.
2578
 
</p>
2579
 
<p>
2580
 
See also: <a class="link" href="VipsForeign.html#vips-csvload" title="vips_csvload ()"><code class="function">vips_csvload()</code></a>.
2581
 
</p>
2582
 
<div class="variablelist"><table border="0" class="variablelist">
2583
 
<colgroup>
2584
 
<col align="left" valign="top">
2585
 
<col>
2586
 
</colgroup>
2587
 
<tbody>
2588
 
<tr>
2589
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2590
 
<td>file to load</td>
2591
 
</tr>
2592
 
<tr>
2593
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
2594
 
<td>output image</td>
2595
 
</tr>
2596
 
<tr>
2597
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2598
 
<td>
2599
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2600
 
</tr>
2601
 
<tr>
2602
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2603
 
<td>0 on success, -1 on error.</td>
2604
 
</tr>
2605
 
</tbody>
2606
 
</table></div>
2607
 
</div>
2608
 
<hr>
2609
 
<div class="refsect2">
2610
 
<a name="vips-matrixsave"></a><h3>vips_matrixsave ()</h3>
2611
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_matrixsave                     (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
2612
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2613
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2614
 
<p>
2615
 
Write <em class="parameter"><code>in</code></em> to <em class="parameter"><code>filename</code></em> in matrix format. See <a class="link" href="VipsForeign.html#vips-matrixload" title="vips_matrixload ()"><code class="function">vips_matrixload()</code></a> for a
2616
 
description of the format.
2617
 
</p>
2618
 
<p>
2619
 
See also: <a class="link" href="VipsForeign.html#vips-matrixload" title="vips_matrixload ()"><code class="function">vips_matrixload()</code></a>.
2620
 
</p>
2621
 
<div class="variablelist"><table border="0" class="variablelist">
2622
 
<colgroup>
2623
 
<col align="left" valign="top">
2624
 
<col>
2625
 
</colgroup>
2626
 
<tbody>
2627
 
<tr>
2628
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
2629
 
<td>image to save</td>
2630
 
</tr>
2631
 
<tr>
2632
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2633
 
<td>file to write to</td>
2634
 
</tr>
2635
 
<tr>
2636
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2637
 
<td>
2638
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2639
 
</tr>
2640
 
<tr>
2641
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2642
 
<td>0 on success, -1 on error.</td>
2643
 
</tr>
2644
 
</tbody>
2645
 
</table></div>
2646
 
</div>
2647
 
<hr>
2648
 
<div class="refsect2">
2649
 
<a name="vips-matrixprint"></a><h3>vips_matrixprint ()</h3>
2650
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_matrixprint                    (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
2651
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2652
 
<p>
2653
 
Print <em class="parameter"><code>in</code></em> to <code class="literal">stdout</code> in matrix format. See <a class="link" href="VipsForeign.html#vips-matrixload" title="vips_matrixload ()"><code class="function">vips_matrixload()</code></a> for a
2654
 
description of the format.
2655
 
</p>
2656
 
<p>
2657
 
See also: <a class="link" href="VipsForeign.html#vips-matrixload" title="vips_matrixload ()"><code class="function">vips_matrixload()</code></a>.
2658
 
</p>
2659
 
<div class="variablelist"><table border="0" class="variablelist">
2660
 
<colgroup>
2661
 
<col align="left" valign="top">
2662
 
<col>
2663
 
</colgroup>
2664
 
<tbody>
2665
 
<tr>
2666
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
2667
 
<td>image to print</td>
2668
 
</tr>
2669
 
<tr>
2670
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2671
 
<td>
2672
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2673
 
</tr>
2674
 
<tr>
2675
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2676
 
<td>0 on success, -1 on error.</td>
2677
 
</tr>
2678
 
</tbody>
2679
 
</table></div>
2680
 
</div>
2681
 
<hr>
2682
 
<div class="refsect2">
2683
 
<a name="vips-magickload"></a><h3>vips_magickload ()</h3>
2684
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_magickload                     (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2685
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
2686
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2687
 
<p>
2688
 
Optional arguments:
2689
 
</p>
2690
 
<p>
2691
 
<em class="parameter"><code>all_frames</code></em>: load all frames in sequence
2692
 
</p>
2693
 
<p>
2694
 
Read in an image using libMagick, the ImageMagick library. This library can
2695
 
read more than 80 file formats, including SVG, BMP, EPS, DICOM and many 
2696
 
others.
2697
 
The reader can handle any ImageMagick image, including the float and double
2698
 
formats. It will work with any quantum size, including HDR. Any metadata
2699
 
attached to the libMagick image is copied on to the VIPS image.
2700
 
</p>
2701
 
<p>
2702
 
The reader should also work with most versions of GraphicsMagick. See the
2703
 
"--with-magickpackage" configure option.
2704
 
</p>
2705
 
<p>
2706
 
Normally it will only load the first image in a many-image sequence (such
2707
 
as a GIF). Set <em class="parameter"><code>all_frames</code></em> to true to read the whole image sequence. 
2708
 
</p>
2709
 
<p>
2710
 
See also: <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a>.
2711
 
</p>
2712
 
<div class="variablelist"><table border="0" class="variablelist">
2713
 
<colgroup>
2714
 
<col align="left" valign="top">
2715
 
<col>
2716
 
</colgroup>
2717
 
<tbody>
2718
 
<tr>
2719
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2720
 
<td>file to load</td>
2721
 
</tr>
2722
 
<tr>
2723
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
2724
 
<td>decompressed image</td>
2725
 
</tr>
2726
 
<tr>
2727
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2728
 
<td>
2729
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2730
 
</tr>
2731
 
<tr>
2732
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2733
 
<td>0 on success, -1 on error.</td>
2734
 
</tr>
2735
 
</tbody>
2736
 
</table></div>
2737
 
</div>
2738
 
<hr>
2739
 
<div class="refsect2">
2740
 
<a name="vips-pngload"></a><h3>vips_pngload ()</h3>
2741
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_pngload                        (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2742
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
2743
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2744
 
<p>
2745
 
Optional arguments:
2746
 
</p>
2747
 
<p>
2748
 
Read a PNG file into a VIPS image. It can read all png images, including 8-
2749
 
and 16-bit images, 1 and 3 channel, with and without an alpha channel.
2750
 
</p>
2751
 
<p>
2752
 
Any ICC profile is read and attached to the VIPS image.
2753
 
</p>
2754
 
<p>
2755
 
See also: <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a>.
2756
 
</p>
2757
 
<div class="variablelist"><table border="0" class="variablelist">
2758
 
<colgroup>
2759
 
<col align="left" valign="top">
2760
 
<col>
2761
 
</colgroup>
2762
 
<tbody>
2763
 
<tr>
2764
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2765
 
<td>file to load</td>
2766
 
</tr>
2767
 
<tr>
2768
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
2769
 
<td>decompressed image</td>
2770
 
</tr>
2771
 
<tr>
2772
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2773
 
<td>
2774
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2775
 
</tr>
2776
 
<tr>
2777
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2778
 
<td>0 on success, -1 on error.</td>
2779
 
</tr>
2780
 
</tbody>
2781
 
</table></div>
2782
 
</div>
2783
 
<hr>
2784
 
<div class="refsect2">
2785
 
<a name="vips-pngload-buffer"></a><h3>vips_pngload_buffer ()</h3>
2786
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_pngload_buffer                 (<em class="parameter"><code><span class="type">void</span> *buf</code></em>,
2787
 
                                                         <em class="parameter"><code><span class="type">size_t</span> len</code></em>,
2788
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
2789
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2790
 
<p>
2791
 
Read a PNG-formatted memory block into a VIPS image. It can read all png 
2792
 
images, including 8- and 16-bit images, 1 and 3 channel, with and without 
2793
 
an alpha channel.
2794
 
</p>
2795
 
<p>
2796
 
Any ICC profile is read and attached to the VIPS image.
2797
 
</p>
2798
 
<p>
2799
 
Caution: on return only the header will have been read, the pixel data is
2800
 
not decompressed until the first pixel is read. Therefore you must not free
2801
 
<em class="parameter"><code>buf</code></em> until you have read pixel data from <em class="parameter"><code>out</code></em>.
2802
 
</p>
2803
 
<p>
2804
 
See also: <a class="link" href="VipsForeign.html#vips-pngload" title="vips_pngload ()"><code class="function">vips_pngload()</code></a>.
2805
 
</p>
2806
 
<div class="variablelist"><table border="0" class="variablelist">
2807
 
<colgroup>
2808
 
<col align="left" valign="top">
2809
 
<col>
2810
 
</colgroup>
2811
 
<tbody>
2812
 
<tr>
2813
 
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
2814
 
<td>memory area to load</td>
2815
 
</tr>
2816
 
<tr>
2817
 
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
2818
 
<td>size of memory area</td>
2819
 
</tr>
2820
 
<tr>
2821
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
2822
 
<td>image to write</td>
2823
 
</tr>
2824
 
<tr>
2825
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2826
 
<td>
2827
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2828
 
</tr>
2829
 
<tr>
2830
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2831
 
<td>0 on success, -1 on error.</td>
2832
 
</tr>
2833
 
</tbody>
2834
 
</table></div>
2835
 
</div>
2836
 
<hr>
2837
 
<div class="refsect2">
2838
 
<a name="vips-pngsave"></a><h3>vips_pngsave ()</h3>
2839
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_pngsave                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
2840
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2841
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2842
 
<p>
2843
 
Optional arguments:
2844
 
</p>
2845
 
<p>
2846
 
<em class="parameter"><code>compression</code></em>: compression level
2847
 
<em class="parameter"><code>interlace</code></em>: interlace image
2848
 
</p>
2849
 
<p>
2850
 
Write a VIPS image to a file as PNG.
2851
 
</p>
2852
 
<p>
2853
 
<em class="parameter"><code>compression</code></em> means compress with this much effort (0 - 9). Default 6.
2854
 
</p>
2855
 
<p>
2856
 
Set <em class="parameter"><code>interlace</code></em> to <code class="literal">TRUE</code> to interlace the image with ADAM7 
2857
 
interlacing. Beware
2858
 
than an interlaced PNG can be up to 7 times slower to write than a
2859
 
non-interlaced image.
2860
 
</p>
2861
 
<p>
2862
 
If the VIPS header 
2863
 
contains an ICC profile named VIPS_META_ICC_NAME ("icc-profile-data"), the
2864
 
profile from the VIPS header will be attached.
2865
 
</p>
2866
 
<p>
2867
 
The image is automatically converted to RGB, RGBA, Monochrome or Mono +
2868
 
alpha before saving. Images with more than one byte per band element are
2869
 
saved as 16-bit PNG, others are saved as 8-bit PNG.
2870
 
</p>
2871
 
<p>
2872
 
See also: <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a>.
2873
 
</p>
2874
 
<div class="variablelist"><table border="0" class="variablelist">
2875
 
<colgroup>
2876
 
<col align="left" valign="top">
2877
 
<col>
2878
 
</colgroup>
2879
 
<tbody>
2880
 
<tr>
2881
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
2882
 
<td>image to save</td>
2883
 
</tr>
2884
 
<tr>
2885
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2886
 
<td>file to write to</td>
2887
 
</tr>
2888
 
<tr>
2889
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2890
 
<td>
2891
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2892
 
</tr>
2893
 
<tr>
2894
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2895
 
<td>0 on success, -1 on error.</td>
2896
 
</tr>
2897
 
</tbody>
2898
 
</table></div>
2899
 
</div>
2900
 
<hr>
2901
 
<div class="refsect2">
2902
 
<a name="vips-pngsave-buffer"></a><h3>vips_pngsave_buffer ()</h3>
2903
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_pngsave_buffer                 (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
2904
 
                                                         <em class="parameter"><code><span class="type">void</span> **buf</code></em>,
2905
 
                                                         <em class="parameter"><code><span class="type">size_t</span> *len</code></em>,
2906
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2907
 
<p>
2908
 
Optional arguments:
2909
 
</p>
2910
 
<p>
2911
 
<em class="parameter"><code>compression</code></em>: compression level
2912
 
<em class="parameter"><code>interlace</code></em>: interlace image
2913
 
</p>
2914
 
<p>
2915
 
As <a class="link" href="VipsForeign.html#vips-pngsave" title="vips_pngsave ()"><code class="function">vips_pngsave()</code></a>, but save to a memory buffer. 
2916
 
</p>
2917
 
<p>
2918
 
The address of the buffer is returned in <em class="parameter"><code>obuf</code></em>, the length of the buffer in
2919
 
<em class="parameter"><code>olen</code></em>. You are responsible for freeing the buffer with <code class="function">g_free()</code> when you
2920
 
are done with it.
2921
 
</p>
2922
 
<p>
2923
 
See also: <a class="link" href="VipsForeign.html#vips-pngsave" title="vips_pngsave ()"><code class="function">vips_pngsave()</code></a>, <a class="link" href="VipsImage.html#vips-image-write-to-file" title="vips_image_write_to_file ()"><code class="function">vips_image_write_to_file()</code></a>.
2924
 
</p>
2925
 
<div class="variablelist"><table border="0" class="variablelist">
2926
 
<colgroup>
2927
 
<col align="left" valign="top">
2928
 
<col>
2929
 
</colgroup>
2930
 
<tbody>
2931
 
<tr>
2932
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
2933
 
<td>image to save</td>
2934
 
</tr>
2935
 
<tr>
2936
 
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
2937
 
<td>return output buffer here</td>
2938
 
</tr>
2939
 
<tr>
2940
 
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
2941
 
<td>return output length here</td>
2942
 
</tr>
2943
 
<tr>
2944
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2945
 
<td>
2946
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2947
 
</tr>
2948
 
<tr>
2949
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2950
 
<td>0 on success, -1 on error.</td>
2951
 
</tr>
2952
 
</tbody>
2953
 
</table></div>
2954
 
</div>
2955
 
<hr>
2956
 
<div class="refsect2">
2957
 
<a name="vips-ppmload"></a><h3>vips_ppmload ()</h3>
2958
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_ppmload                        (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
2959
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
2960
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
2961
 
<p>
2962
 
Read a PPM/PBM/PGM/PFM file into a VIPS image. 
2963
 
</p>
2964
 
<p>
2965
 
It can read 1, 8, 16 and 32 bit images, colour or monochrome,
2966
 
stored in binary or in ASCII. One bit images become 8 bit VIPS images, 
2967
 
with 0 and 255 for 0 and 1.
2968
 
</p>
2969
 
<p>
2970
 
See also: <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a>.
2971
 
</p>
2972
 
<div class="variablelist"><table border="0" class="variablelist">
2973
 
<colgroup>
2974
 
<col align="left" valign="top">
2975
 
<col>
2976
 
</colgroup>
2977
 
<tbody>
2978
 
<tr>
2979
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
2980
 
<td>file to load</td>
2981
 
</tr>
2982
 
<tr>
2983
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
2984
 
<td>output image</td>
2985
 
</tr>
2986
 
<tr>
2987
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2988
 
<td>
2989
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
2990
 
</tr>
2991
 
<tr>
2992
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2993
 
<td>0 on success, -1 on error.</td>
2994
 
</tr>
2995
 
</tbody>
2996
 
</table></div>
2997
 
</div>
2998
 
<hr>
2999
 
<div class="refsect2">
3000
 
<a name="vips-ppmsave"></a><h3>vips_ppmsave ()</h3>
3001
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_ppmsave                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
3002
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
3003
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
3004
 
<p>
3005
 
Optional arguments:
3006
 
</p>
3007
 
<p>
3008
 
<em class="parameter"><code>ascii</code></em>: save as ASCII rather than binary
3009
 
</p>
3010
 
<p>
3011
 
Write a VIPS image to a file as PPM. It can write 8, 16 or
3012
 
32 bit unsigned integer images, float images, colour or monochrome, 
3013
 
stored as binary or ASCII. 
3014
 
Integer images of more than 8 bits can only be stored in ASCII.
3015
 
</p>
3016
 
<p>
3017
 
When writing float (PFM) images the scale factor is set from the 
3018
 
"pfm-scale" metadata.
3019
 
</p>
3020
 
<p>
3021
 
Set <em class="parameter"><code>ascii</code></em> to <code class="literal">TRUE</code> to write as human-readable ASCII. Normally data is
3022
 
written in binary. 
3023
 
</p>
3024
 
<p>
3025
 
The storage format is indicated by a filename extension. Use one of .pbm,
3026
 
.pgm, .ppm, .pfm. 
3027
 
</p>
3028
 
<p>
3029
 
See also: <code class="function">vips_image_write_file()</code>.
3030
 
</p>
3031
 
<div class="variablelist"><table border="0" class="variablelist">
3032
 
<colgroup>
3033
 
<col align="left" valign="top">
3034
 
<col>
3035
 
</colgroup>
3036
 
<tbody>
3037
 
<tr>
3038
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
3039
 
<td>image to save</td>
3040
 
</tr>
3041
 
<tr>
3042
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
3043
 
<td>file to write to</td>
3044
 
</tr>
3045
 
<tr>
3046
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
3047
 
<td>
3048
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
3049
 
</tr>
3050
 
<tr>
3051
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3052
 
<td>0 on success, -1 on error.</td>
3053
 
</tr>
3054
 
</tbody>
3055
 
</table></div>
3056
 
</div>
3057
 
<hr>
3058
 
<div class="refsect2">
3059
 
<a name="vips-matload"></a><h3>vips_matload ()</h3>
3060
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_matload                        (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
3061
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
3062
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
3063
 
<p>
3064
 
Read a Matlab save file into a VIPS image. 
3065
 
</p>
3066
 
<p>
3067
 
This operation searches the save
3068
 
file for the first array variable with between 1 and 3 dimensions and loads
3069
 
it as an image. It will not handle complex images. It does not handle
3070
 
sparse matrices. 
3071
 
</p>
3072
 
<p>
3073
 
See also: <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a>.
3074
 
</p>
3075
 
<div class="variablelist"><table border="0" class="variablelist">
3076
 
<colgroup>
3077
 
<col align="left" valign="top">
3078
 
<col>
3079
 
</colgroup>
3080
 
<tbody>
3081
 
<tr>
3082
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
3083
 
<td>file to load</td>
3084
 
</tr>
3085
 
<tr>
3086
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
3087
 
<td>output image</td>
3088
 
</tr>
3089
 
<tr>
3090
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
3091
 
<td>
3092
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
3093
 
</tr>
3094
 
<tr>
3095
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3096
 
<td>0 on success, -1 on error.</td>
3097
 
</tr>
3098
 
</tbody>
3099
 
</table></div>
3100
 
</div>
3101
 
<hr>
3102
 
<div class="refsect2">
3103
 
<a name="vips-radload"></a><h3>vips_radload ()</h3>
3104
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_radload                        (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
3105
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
3106
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
3107
 
<p>
3108
 
Read a Radiance (HDR) file into a VIPS image. 
3109
 
</p>
3110
 
<p>
3111
 
Radiance files are read as <a class="link" href="VipsImage.html#VIPS-CODING-RAD:CAPS"><span class="type">VIPS_CODING_RAD</span></a>. They have one byte for each of
3112
 
red, green and blue, and one byte of shared exponent. Some operations (like
3113
 
<a class="link" href="libvips-conversion.html#vips-extract-area" title="vips_extract_area ()"><code class="function">vips_extract_area()</code></a>) can work directly with images in this format, but 
3114
 
mmany (all the arithmetic operations, for example) will not. Unpack 
3115
 
<a class="link" href="VipsImage.html#VIPS-CODING-RAD:CAPS"><span class="type">VIPS_CODING_RAD</span></a> images to 3 band float with <a href="http://http://www.vips.ecs.soton.ac.uk/libvips-colour.html#im-rad2float"><code class="function">im_rad2float()</code></a> if you want to do
3116
 
arithmetic on them.
3117
 
</p>
3118
 
<p>
3119
 
This operation ignores some header fields, like VIEW and DATE. It will not 
3120
 
rotate/flip as the FORMAT string asks.
3121
 
</p>
3122
 
<p>
3123
 
Sections of this reader from Greg Ward and Radiance with kind permission. 
3124
 
</p>
3125
 
<p>
3126
 
See also: <a class="link" href="VipsImage.html#vips-image-new-from-file" title="vips_image_new_from_file ()"><code class="function">vips_image_new_from_file()</code></a>.
3127
 
</p>
3128
 
<div class="variablelist"><table border="0" class="variablelist">
3129
 
<colgroup>
3130
 
<col align="left" valign="top">
3131
 
<col>
3132
 
</colgroup>
3133
 
<tbody>
3134
 
<tr>
3135
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
3136
 
<td>file to load</td>
3137
 
</tr>
3138
 
<tr>
3139
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
3140
 
<td>output image</td>
3141
 
</tr>
3142
 
<tr>
3143
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
3144
 
<td>
3145
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
3146
 
</tr>
3147
 
<tr>
3148
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3149
 
<td>0 on success, -1 on error.</td>
3150
 
</tr>
3151
 
</tbody>
3152
 
</table></div>
3153
 
</div>
3154
 
<hr>
3155
 
<div class="refsect2">
3156
 
<a name="vips-radsave"></a><h3>vips_radsave ()</h3>
3157
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_radsave                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
3158
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
3159
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
3160
 
<p>
3161
 
Write a VIPS image in Radiance (HDR) format.
3162
 
</p>
3163
 
<p>
3164
 
Sections of this reader from Greg Ward and Radiance with kind permission. 
3165
 
</p>
3166
 
<p>
3167
 
See also: <code class="function">vips_image_write_file()</code>.
3168
 
</p>
3169
 
<div class="variablelist"><table border="0" class="variablelist">
3170
 
<colgroup>
3171
 
<col align="left" valign="top">
3172
 
<col>
3173
 
</colgroup>
3174
 
<tbody>
3175
 
<tr>
3176
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
3177
 
<td>image to save</td>
3178
 
</tr>
3179
 
<tr>
3180
 
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
3181
 
<td>file to write to</td>
3182
 
</tr>
3183
 
<tr>
3184
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
3185
 
<td>
3186
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
3187
 
</tr>
3188
 
<tr>
3189
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3190
 
<td>0 on success, -1 on error.</td>
3191
 
</tr>
3192
 
</tbody>
3193
 
</table></div>
3194
 
</div>
3195
 
<hr>
3196
 
<div class="refsect2">
3197
 
<a name="VipsForeignDzLayout"></a><h3>enum VipsForeignDzLayout</h3>
3198
 
<pre class="programlisting">typedef enum {
3199
 
        VIPS_FOREIGN_DZ_LAYOUT_DZ,
3200
 
        VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY,
3201
 
        VIPS_FOREIGN_DZ_LAYOUT_GOOGLE,
3202
 
        VIPS_FOREIGN_DZ_LAYOUT_LAST
3203
 
} VipsForeignDzLayout;
3204
 
</pre>
3205
 
<p>
3206
 
What directory layout and metadata standard to use.
3207
 
</p>
3208
 
<div class="variablelist"><table border="0" class="variablelist">
3209
 
<colgroup>
3210
 
<col align="left" valign="top">
3211
 
<col>
3212
 
</colgroup>
3213
 
<tbody>
3214
 
<tr>
3215
 
<td><p><a name="VIPS-FOREIGN-DZ-LAYOUT-DZ:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_DZ_LAYOUT_DZ</code></span></p></td>
3216
 
<td>use DeepZoom directory layout
3217
 
</td>
3218
 
</tr>
3219
 
<tr>
3220
 
<td><p><a name="VIPS-FOREIGN-DZ-LAYOUT-ZOOMIFY:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY</code></span></p></td>
3221
 
<td>use Zoomify directory layout
3222
 
</td>
3223
 
</tr>
3224
 
<tr>
3225
 
<td><p><a name="VIPS-FOREIGN-DZ-LAYOUT-GOOGLE:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_DZ_LAYOUT_GOOGLE</code></span></p></td>
3226
 
<td>use Google maps directory layout
3227
 
</td>
3228
 
</tr>
3229
 
<tr>
3230
 
<td><p><a name="VIPS-FOREIGN-DZ-LAYOUT-LAST:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_DZ_LAYOUT_LAST</code></span></p></td>
3231
 
<td>
3232
 
</td>
3233
 
</tr>
3234
 
</tbody>
3235
 
</table></div>
3236
 
</div>
3237
 
<hr>
3238
 
<div class="refsect2">
3239
 
<a name="VipsForeignDzDepth"></a><h3>enum VipsForeignDzDepth</h3>
3240
 
<pre class="programlisting">typedef enum {
3241
 
        VIPS_FOREIGN_DZ_DEPTH_1PIXEL,
3242
 
        VIPS_FOREIGN_DZ_DEPTH_1TILE,
3243
 
        VIPS_FOREIGN_DZ_DEPTH_1,
3244
 
        VIPS_FOREIGN_DZ_DEPTH_LAST
3245
 
} VipsForeignDzDepth;
3246
 
</pre>
3247
 
<p>
3248
 
How many pyramid layers to create.
3249
 
</p>
3250
 
<div class="variablelist"><table border="0" class="variablelist">
3251
 
<colgroup>
3252
 
<col align="left" valign="top">
3253
 
<col>
3254
 
</colgroup>
3255
 
<tbody>
3256
 
<tr>
3257
 
<td><p><a name="VIPS-FOREIGN-DZ-DEPTH-1PIXEL:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_DZ_DEPTH_1PIXEL</code></span></p></td>
3258
 
<td>create layers down to 1x1 pixel
3259
 
</td>
3260
 
</tr>
3261
 
<tr>
3262
 
<td><p><a name="VIPS-FOREIGN-DZ-DEPTH-1TILE:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_DZ_DEPTH_1TILE</code></span></p></td>
3263
 
<td>create layers down to 1x1 tile
3264
 
</td>
3265
 
</tr>
3266
 
<tr>
3267
 
<td><p><a name="VIPS-FOREIGN-DZ-DEPTH-1:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_DZ_DEPTH_1</code></span></p></td>
3268
 
<td>only create a single layer
3269
 
</td>
3270
 
</tr>
3271
 
<tr>
3272
 
<td><p><a name="VIPS-FOREIGN-DZ-DEPTH-LAST:CAPS"></a><span class="term"><code class="literal">VIPS_FOREIGN_DZ_DEPTH_LAST</code></span></p></td>
3273
 
<td>
3274
 
</td>
3275
 
</tr>
3276
 
</tbody>
3277
 
</table></div>
3278
 
</div>
3279
 
<hr>
3280
 
<div class="refsect2">
3281
 
<a name="vips-dzsave"></a><h3>vips_dzsave ()</h3>
3282
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_dzsave                         (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
3283
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *basename</code></em>,
3284
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
3285
 
<p>
3286
 
Optional arguments:
3287
 
</p>
3288
 
<p>
3289
 
<em class="parameter"><code>layout</code></em>; directory layout convention
3290
 
<em class="parameter"><code>suffix</code></em>: suffix for tile tiles 
3291
 
<em class="parameter"><code>overlap</code></em>; set tile overlap 
3292
 
<em class="parameter"><code>tile_size</code></em>; set tile size 
3293
 
<em class="parameter"><code>background</code></em>: background colour
3294
 
<em class="parameter"><code>depth</code></em>: how deep to make the pyramid
3295
 
<em class="parameter"><code>centre</code></em>: centre the tiles 
3296
 
<em class="parameter"><code>angle</code></em>: rotate the image by this much
3297
 
</p>
3298
 
<p>
3299
 
Save an image as a set of tiles at various resolutions. By default dzsave
3300
 
uses DeepZoom layout -- use <em class="parameter"><code>layout</code></em> to pick other conventions.
3301
 
</p>
3302
 
<p>
3303
 
In DeepZoom layout a directory called
3304
 
"<em class="parameter"><code>basename_files</code></em>" is created to hold the tiles, and an XML file called
3305
 
"<em class="parameter"><code>basename.dzi</code></em>" is written with the image metadata, 
3306
 
</p>
3307
 
<p>
3308
 
In Zoomify and Google layout, a directory called <em class="parameter"><code>basename</code></em> is created to 
3309
 
hold the tile structure. 
3310
 
</p>
3311
 
<p>
3312
 
You can set <em class="parameter"><code>suffix</code></em> to something like ".jpg[Q=85]" to control the tile write
3313
 
options. 
3314
 
</p>
3315
 
<p>
3316
 
In Google layout mode, edge tiles are expanded to <em class="parameter"><code>tile_size</code></em> by <em class="parameter"><code>tile_size</code></em> 
3317
 
pixels. Normally they are filled with white, but you can set another colour
3318
 
with <em class="parameter"><code>background</code></em>. Images are usually placed at the top-left of the tile,
3319
 
but you can have them centred by turning on <em class="parameter"><code>centre</code></em>. 
3320
 
</p>
3321
 
<p>
3322
 
You can set the size and overlap of tiles with <em class="parameter"><code>tile_size</code></em> and <em class="parameter"><code>overlap</code></em>.
3323
 
They default to the correct settings for the selected <em class="parameter"><code>layout</code></em>. 
3324
 
</p>
3325
 
<p>
3326
 
Use <em class="parameter"><code>depth</code></em> to control how low the pyramid goes. This defaults to the
3327
 
correct setting for the <em class="parameter"><code>layout</code></em> you select.
3328
 
</p>
3329
 
<p>
3330
 
See also: <a class="link" href="VipsForeign.html#vips-tiffsave" title="vips_tiffsave ()"><code class="function">vips_tiffsave()</code></a>.
3331
 
</p>
3332
 
<div class="variablelist"><table border="0" class="variablelist">
3333
 
<colgroup>
3334
 
<col align="left" valign="top">
3335
 
<col>
3336
 
</colgroup>
3337
 
<tbody>
3338
 
<tr>
3339
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
3340
 
<td>image to save</td>
3341
 
</tr>
3342
 
<tr>
3343
 
<td><p><span class="term"><em class="parameter"><code>basename</code></em> :</span></p></td>
3344
 
<td>basename to save to</td>
3345
 
</tr>
3346
 
<tr>
3347
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
3348
 
<td>
3349
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
3350
 
</tr>
3351
 
<tr>
3352
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3353
 
<td>0 on success, -1 on error.</td>
3354
 
</tr>
3355
 
</tbody>
3356
 
</table></div>
3357
 
</div>
3358
 
</div>
3359
 
<div class="refsect1">
3360
 
<a name="VipsForeign.property-details"></a><h2>Property Details</h2>
3361
 
<div class="refsect2">
3362
 
<a name="VipsForeignLoad--access"></a><h3>The <code class="literal">"access"</code> property</h3>
3363
 
<pre class="programlisting">  "access"                   <a class="link" href="VipsImage.html#VipsAccess" title="enum VipsAccess"><span class="type">VipsAccess</span></a>            : Read / Write</pre>
3364
 
<p>Required access pattern for this file.</p>
3365
 
<p>Default value: VIPS_ACCESS_RANDOM</p>
3366
 
</div>
3367
 
<hr>
3368
 
<div class="refsect2">
3369
 
<a name="VipsForeignLoad--disc"></a><h3>The <code class="literal">"disc"</code> property</h3>
3370
 
<pre class="programlisting">  "disc"                     <span class="type">gboolean</span>              : Read / Write</pre>
3371
 
<p>Open to disc.</p>
3372
 
<p>Default value: TRUE</p>
3373
 
</div>
3374
 
<hr>
3375
 
<div class="refsect2">
3376
 
<a name="VipsForeignLoad--flags"></a><h3>The <code class="literal">"flags"</code> property</h3>
3377
 
<pre class="programlisting">  "flags"                    <a class="link" href="VipsForeign.html#VipsForeignFlags" title="enum VipsForeignFlags"><span class="type">VipsForeignFlags</span></a>      : Read / Write</pre>
3378
 
<p>Flags for this file.</p>
3379
 
</div>
3380
 
<hr>
3381
 
<div class="refsect2">
3382
 
<a name="VipsForeignLoad--out"></a><h3>The <code class="literal">"out"</code> property</h3>
3383
 
<pre class="programlisting">  "out"                      <a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a>*            : Read / Write</pre>
3384
 
<p>Output image.</p>
3385
 
</div>
3386
 
<hr>
3387
 
<div class="refsect2">
3388
 
<a name="VipsForeignLoad--sequential"></a><h3>The <code class="literal">"sequential"</code> property</h3>
3389
 
<pre class="programlisting">  "sequential"               <span class="type">gboolean</span>              : Read / Write</pre>
3390
 
<p>Sequential read only.</p>
3391
 
<p>Default value: FALSE</p>
3392
 
</div>
3393
 
<hr>
3394
 
<div class="refsect2">
3395
 
<a name="VipsForeignSave--in"></a><h3>The <code class="literal">"in"</code> property</h3>
3396
 
<pre class="programlisting">  "in"                       <a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a>*            : Read / Write</pre>
3397
 
<p>Image to save.</p>
3398
 
</div>
3399
 
<hr>
3400
 
<div class="refsect2">
3401
 
<a name="VipsForeignSave--strip"></a><h3>The <code class="literal">"strip"</code> property</h3>
3402
 
<pre class="programlisting">  "strip"                    <span class="type">gboolean</span>              : Read / Write</pre>
3403
 
<p>Strip all metadata from image.</p>
3404
 
<p>Default value: FALSE</p>
3405
 
</div>
3406
 
</div>
3407
 
<div class="refsect1">
3408
 
<a name="VipsForeign.see-also"></a><h2>See Also</h2>
3409
 
image
3410
 
</div>
3411
 
</div>
3412
 
<div class="footer">
3413
 
<hr>
3414
 
          Generated by GTK-Doc V1.19</div>
3415
 
</body>
3416
 
</html>
 
 
b'\\ No newline at end of file'