/usr/share/gtk-doc/html/libvips/libvips-vips.html is in libvips-doc 7.40.6-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>VIPS Reference Manual: vips</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="VIPS Reference Manual">
<link rel="up" href="ch02.html" title="Core VIPS API">
<link rel="prev" href="ch02.html" title="Core VIPS API">
<link rel="next" href="VipsImage.html" title="VipsImage">
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#libvips-vips.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#libvips-vips.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch02.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="VipsImage.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libvips-vips"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libvips-vips.top_of_page"></a>vips</span></h2>
<p>vips — startup, shutdown, version</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libvips-vips.stability-level"></a><h2>Stability Level</h2>
Stable, unless otherwise indicated
</div>
<div class="refsect1">
<a name="libvips-vips.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="libvips-vips.html#VIPS-INIT:CAPS" title="VIPS_INIT()">VIPS_INIT</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libvips-vips.html#vips-get-argv0" title="vips_get_argv0 ()">vips_get_argv0</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libvips-vips.html#vips-shutdown" title="vips_shutdown ()">vips_shutdown</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libvips-vips.html#vips-thread-shutdown" title="vips_thread_shutdown ()">vips_thread_shutdown</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *
</td>
<td class="function_name">
<a class="link" href="libvips-vips.html#vips-get-option-group" title="vips_get_option_group ()">vips_get_option_group</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libvips-vips.html#vips-version-string" title="vips_version_string ()">vips_version_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-vips.html#vips-version" title="vips_version ()">vips_version</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libvips-vips.html#vips-guess-prefix" title="vips_guess_prefix ()">vips_guess_prefix</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libvips-vips.html#vips-guess-libdir" title="vips_guess_libdir ()">vips_guess_libdir</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libvips-vips.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">
</pre>
</div>
<div class="refsect1">
<a name="libvips-vips.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <vips/vips.h>
</pre>
</div>
<div class="refsect1">
<a name="libvips-vips.description"></a><h2>Description</h2>
<p>Start VIPS up, shut VIPS down, get version information, relocation. </p>
<p>VIPS is a relocatable package, meaning you can move the directory tree you
compiled it to at runtime and it will still be able to find all data files.
This is required for OS X and Windows, but slightly unusual in the Unix
world. See <code class="function">vips_init()</code> and <a class="link" href="libvips-vips.html#vips-guess-prefix" title="vips_guess_prefix ()"><code class="function">vips_guess_prefix()</code></a>.</p>
</div>
<div class="refsect1">
<a name="libvips-vips.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="VIPS-INIT:CAPS"></a><h3>VIPS_INIT()</h3>
<pre class="programlisting">#define VIPS_INIT( ARGV0 )</pre>
<div class="warning"><p><code class="literal">VIPS_INIT</code> is deprecated and should not be used in newly-written code.</p></div>
<p>VIPS_INIT() starts up the world of VIPS. You should call this on
program startup before using any other VIPS operations. If you do not call
<a class="link" href="libvips-vips.html#VIPS-INIT:CAPS" title="VIPS_INIT()"><code class="function">VIPS_INIT()</code></a>, VIPS will call it for you when you use your first VIPS
operation, but it may not be able to get hold of <em class="parameter"><code>argv0</code></em>
and VIPS may
therefore be unable to find its data files. It is much better to call
this macro yourself.</p>
<p>VIPS_INIT() is a macro, since it tries to check binary compatibility
between the caller and the library. </p>
<p>VIPS_INIT() does approximately the following:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>checks that the libvips your program is expecting is
binary-compatible with the vips library you're running against</p></li>
<li class="listitem"><p>initialises any libraries that VIPS is using, including GObject
and the threading system, if neccessary</p></li>
<li class="listitem"><p>guesses where the VIPS data files are and sets up
internationalisation --- see <a class="link" href="libvips-vips.html#vips-guess-prefix" title="vips_guess_prefix ()"><code class="function">vips_guess_prefix()</code></a></p></li>
<li class="listitem"><p>creates the main vips types, including <a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> and friends</p></li>
<li class="listitem"><p>loads any plugins from $libdir/vips-x.y/, where x and y are the
major and minor version numbers for this VIPS.</p></li>
</ul></div>
<p>Example:</p>
<div class="informalexample"><pre class="programlisting">
int main (int argc, char **argv)
{
if (VIPS_INIT (argv[0]))
vips_error_exit ("unable to start VIPS");
vips_shutdown ();
return 0;
}
</pre></div>
<p></p>
<p>See also: <a class="link" href="libvips-vips.html#vips-shutdown" title="vips_shutdown ()"><code class="function">vips_shutdown()</code></a>, <a class="link" href="libvips-vips.html#vips-get-option-group" title="vips_get_option_group ()"><code class="function">vips_get_option_group()</code></a>, <a class="link" href="libvips-vips.html#vips-version" title="vips_version ()"><code class="function">vips_version()</code></a>,
<a class="link" href="libvips-vips.html#vips-guess-prefix" title="vips_guess_prefix ()"><code class="function">vips_guess_prefix()</code></a>, <a class="link" href="libvips-vips.html#vips-guess-libdir" title="vips_guess_libdir ()"><code class="function">vips_guess_libdir()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.2.8.2.13"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>argv0</p></td>
<td class="parameter_description"><p>name of application</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.2.8.2.14"></a><h4>Returns</h4>
<p> 0 on success, -1 otherwise</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-get-argv0"></a><h3>vips_get_argv0 ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
vips_get_argv0 (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>See also: <code class="function">vips_init()</code>.</p>
<div class="refsect3">
<a name="id-1.3.2.8.3.5"></a><h4>Returns</h4>
<p> a pointer to an internal copy of the argv0 string passed to
<code class="function">vips_init()</code>. Do not free this value</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-shutdown"></a><h3>vips_shutdown ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
vips_shutdown (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Call this to drop caches and close plugins. Run with "--vips-leak" to do
a leak check too. May be called many times.</p>
</div>
<hr>
<div class="refsect2">
<a name="vips-thread-shutdown"></a><h3>vips_thread_shutdown ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
vips_thread_shutdown (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Free any thread-private data and flush any profiling information.</p>
<p>This function needs to be called when a thread that has been using vips
exits. It is called for you by <a class="link" href="libvips-vips.html#vips-shutdown" title="vips_shutdown ()"><code class="function">vips_shutdown()</code></a> and for any threads created
by <code class="function">vips_g_thread_new()</code>. </p>
<p>You will need to call it from threads created in
other ways or there will be memory leaks. If you do not call it, vips
will generate a warning message.</p>
<p>It may be called many times, and you can continue using vips after
calling it. Calling it too often will reduce performance.</p>
</div>
<hr>
<div class="refsect2">
<a name="vips-get-option-group"></a><h3>vips_get_option_group ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *
vips_get_option_group (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>vips_get_option_group() returns a <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"><code class="literal">GOptionGroup</code></a> containing various VIPS
command-line options. It can be used with <code class="literal">GOption</code> to help
parse argc/argv.</p>
<p>See also: <a class="link" href="libvips-vips.html#vips-version" title="vips_version ()"><code class="function">vips_version()</code></a>, <a class="link" href="libvips-vips.html#vips-guess-prefix" title="vips_guess_prefix ()"><code class="function">vips_guess_prefix()</code></a>,
<a class="link" href="libvips-vips.html#vips-guess-libdir" title="vips_guess_libdir ()"><code class="function">vips_guess_libdir()</code></a>, <code class="function">vips_init()</code>.</p>
<div class="refsect3">
<a name="id-1.3.2.8.6.6"></a><h4>Returns</h4>
<p> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"><code class="literal">GOptionGroup</code></a> for VIPS, see <code class="literal">GOption</code></p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-version-string"></a><h3>vips_version_string ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
vips_version_string (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Get the VIPS version as a static string, including a build date and time.
Do not free.</p>
<div class="refsect3">
<a name="id-1.3.2.8.7.5"></a><h4>Returns</h4>
<p> a static version string. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-version"></a><h3>vips_version ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_version (<em class="parameter"><code><span class="type">int</span> flag</code></em>);</pre>
<p>Get the major, minor or micro library version, with <em class="parameter"><code>flag</code></em>
values 0, 1 and
2.</p>
<div class="refsect3">
<a name="id-1.3.2.8.8.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>flag</p></td>
<td class="parameter_description"><p>which field of the version to get</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.2.8.8.6"></a><h4>Returns</h4>
<p> library version number</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-guess-prefix"></a><h3>vips_guess_prefix ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
vips_guess_prefix (<em class="parameter"><code>const <span class="type">char</span> *argv0</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *env_name</code></em>);</pre>
<p>vips_guess_prefix() tries to guess the install directory. You should pass
in the value of argv[0] (the name your program was run as) as a clue to
help it out, plus the name of the environment variable you let the user
override your package install area with (eg. "VIPSHOME"). </p>
<p>On success, <a class="link" href="libvips-vips.html#vips-guess-prefix" title="vips_guess_prefix ()"><code class="function">vips_guess_prefix()</code></a> returns the prefix it discovered, and as a
side effect, sets the environment variable (if it's not set).</p>
<p>Don't free the return string!</p>
<p>See also: <a class="link" href="libvips-vips.html#vips-guess-libdir" title="vips_guess_libdir ()"><code class="function">vips_guess_libdir()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.2.8.9.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>argv0</p></td>
<td class="parameter_description"><p>program name (typically argv[0])</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>env_name</p></td>
<td class="parameter_description"><p>save prefix in this environment variable</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.2.8.9.9"></a><h4>Returns</h4>
<p> the install prefix as a static string, do not free. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-guess-libdir"></a><h3>vips_guess_libdir ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
vips_guess_libdir (<em class="parameter"><code>const <span class="type">char</span> *argv0</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *env_name</code></em>);</pre>
<p>vips_guess_libdir() tries to guess the install directory (usually the
configure libdir, or $prefix/lib). You should pass
in the value of argv[0] (the name your program was run as) as a clue to
help it out, plus the name of the environment variable you let the user
override your package install area with (eg. "VIPSHOME"). </p>
<p>On success, <a class="link" href="libvips-vips.html#vips-guess-libdir" title="vips_guess_libdir ()"><code class="function">vips_guess_libdir()</code></a> returns the libdir it discovered, and as a
side effect, sets the prefix environment variable (if it's not set).</p>
<p>Don't free the return string!</p>
<p>See also: <a class="link" href="libvips-vips.html#vips-guess-prefix" title="vips_guess_prefix ()"><code class="function">vips_guess_prefix()</code></a>.</p>
<div class="refsect3">
<a name="id-1.3.2.8.10.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>argv0</p></td>
<td class="parameter_description"><p>program name (typically argv[0])</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>env_name</p></td>
<td class="parameter_description"><p>save prefix in this environment variable</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.2.8.10.9"></a><h4>Returns</h4>
<p> the libdir as a static string, do not free. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
</div>
<div class="refsect1">
<a name="libvips-vips.other_details"></a><h2>Types and Values</h2>
</div>
<div class="refsect1">
<a name="libvips-vips.see-also"></a><h2>See Also</h2>
<a class="link" href="VipsOperation.html" title="VipsOperation">VipsOperation</a>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.20</div>
</body>
</html>
|