/usr/share/doc/liblqr-1-0-dev/html/ref-lqr-carver-new.html is in liblqr-1-0-dev 0.4.2-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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_new</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-carve.html" title="Carver objects"><link rel="prev" href="ref-carve.html" title="Carver objects"><link rel="next" href="ref-lqr-carver-destroy.html" title="lqr_carver_destroy"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><code class="function">lqr_carver_new</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-carve.html">Prev</a> </td><th width="60%" align="center">Carver objects</th><td width="20%" align="right"> <a accesskey="n" href="ref-lqr-carver-destroy.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_new, lqr_carver_new_ext — the <code class="classname">LqrCarver</code> object constructors</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include <lqr.h></pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrCarver* <b class="fsfunc">lqr_carver_new</b>(</code></td><td>guchar* <var class="pdparam">buffer</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">width</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">height</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">channels</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrCarver* <b class="fsfunc">lqr_carver_new_ext</b>(</code></td><td>void* <var class="pdparam">buffer</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">width</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">height</var>, </td></tr><tr><td> </td><td>gint <var class="pdparam">channels</var>, </td></tr><tr><td> </td><td>LqrColDepth <var class="pdparam">colour_depth</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp58391584"></a><h2>Description</h2><p>
The functions <code class="function">lqr_carver_new</code> and <code class="function">lqr_carver_new_ext</code>
create a new <code class="classname">LqrCarver</code> object from an image of size <em class="parameter"><code>width</code></em> * <em class="parameter"><code>height</code></em> with <em class="parameter"><code>channels</code></em>
colour channels.
</p><p>
The image must be stored in <em class="parameter"><code>buffer</code></em> as a plain array of unsigned chars
(for <code class="function">lqr_carver_new</code>) or the appropriate type cast to void (for
<code class="function">lqr_carver_new_ext</code>), ordered by row, then by column, then by colour
channel.
</p><p>
In the extended constructor <code class="function">lqr_carver_new_ext</code>, the additional parameter
<em class="parameter"><code>colour_depth</code></em> is required to specify the colour depth of the buffer (see
<a class="xref" href="ref-lqr-col-depth.html" title="LqrColDepth"><span class="refentrytitle"><span class="type">LqrColDepth</span></span>(3)</a> for more information).
</p><p>
After calling the function, the buffer will be owned by the <code class="classname">LqrCarver</code> object and must not be
accessed any more, unless you subsequently call the <a class="xref" href="ref-lqr-carver-set-preserve-input-image.html" title="lqr_carver_set_preserve_input_image"><span class="refentrytitle"><code class="function">lqr_carver_set_preserve_input_image</code></span>(3)</a> function.
</p><p>
The image type is et automatically from the value of <em class="parameter"><code>channels</code></em> according
to this table:
</p><div class="table"><a name="ref-def-image-types"></a><p class="title"><b>Table 3.1. Image types assigned by default</b></p><div class="table-contents"><table summary="Image types assigned by default" border="1"><colgroup><col><col></colgroup><thead><tr><th>channels</th><th>type</th></tr></thead><tbody><tr><td>1</td><td><code class="literal">LQR_GREY_IMAGE</code></td></tr><tr><td>2</td><td><code class="literal">LQR_GREYA_IMAGE</code></td></tr><tr><td>3</td><td><code class="literal">LQR_RGB_IMAGE</code></td></tr><tr><td>4</td><td><code class="literal">LQR_RGBA_IMAGE</code></td></tr><tr><td>5</td><td><code class="literal">LQR_CMYKA_IMAGE</code></td></tr><tr><td>>5</td><td><code class="literal">LQR_CUSTOM_IMAGE</code></td></tr></tbody></table></div></div><p><br class="table-break">
</p></div><div class="refsect1"><a name="idp58416416"></a><h2>Return value</h2><p>
The return value is the address of the newly created <code class="classname">LqrCarver</code> object, or <code class="literal"><span class="returnvalue">NULL</span></code> in case of
failure (insufficient memory).
</p></div><div class="refsect1"><a name="idp58418896"></a><h2>See also</h2><p>
<span class="simplelist"><a class="xref" href="ref-lqr-col-depth.html" title="LqrColDepth"><span class="refentrytitle"><span class="type">LqrColDepth</span></span>(3)</a>, <a class="xref" href="ref-lqr-image-type.html" title="LqrImageType"><span class="refentrytitle"><span class="type">LqrImageType</span></span>(3)</a>, <a class="xref" href="ref-lqr-carver-destroy.html" title="lqr_carver_destroy"><span class="refentrytitle"><code class="function">lqr_carver_destroy</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-init.html" title="lqr_carver_init"><span class="refentrytitle"><code class="function">lqr_carver_init</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-preserve-input-image.html" title="lqr_carver_set_preserve_input_image"><span class="refentrytitle"><code class="function">lqr_carver_set_preserve_input_image</code></span>(3)</a></span>
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref-carve.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ref-carve.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ref-lqr-carver-destroy.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Carver objects </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <code class="function">lqr_carver_destroy</code></td></tr></table></div></body></html>
|