File manager - Edit - /home/newsbmcs.com/public_html/static/img/logo/html.tar
Back
README 0000644 00000000117 15030713312 0005416 0 ustar 00 You should install imagemagick-6-doc package in order to get html documentation ref-lqr-carver-get-channels.html 0000644 00000011551 15034750062 0012635 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_get_channels</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-get-ref-height.html" title="lqr_carver_get_ref_height"><link rel="next" href="ref-lqr-carver-get-col-depth.html" title="lqr_carver_get_col_depth"></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_get_channels</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-get-ref-height.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-get-col-depth.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-get-channels"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_get_channels, lqr_carver_get_bpp — get the number of channels in a <code class="classname">LqrCarver</code> object</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">gint <b class="fsfunc">lqr_carver_get_channels</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</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">gint <b class="fsfunc">lqr_carver_get_bpp</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2707"></a><h2>Description</h2><p> The functions <code class="function">lqr_carver_get_channels</code> returns the number of colour channels of the image contained in the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>. </p><p> The function <code class="function">lqr_carver_get_bpp</code> is an alias for <code class="function">lqr_carver_get_channels</code>, it is deprecated and it is maintained for backward compatibility purposes only. </p></div><div class="refsect1"><a name="idm2716"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-get-width.html" title="lqr_carver_get_width"><span class="refentrytitle"><code class="function">lqr_carver_get_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-height.html" title="lqr_carver_get_height"><span class="refentrytitle"><code class="function">lqr_carver_get_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-width.html" title="lqr_carver_get_ref_width"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-height.html" title="lqr_carver_get_ref_height"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-col-depth.html" title="lqr_carver_get_col_depth"><span class="refentrytitle"><code class="function">lqr_carver_get_col_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_get_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-orientation.html" title="lqr_carver_get_orientation"><span class="refentrytitle"><code class="function">lqr_carver_get_orientation</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-lqr-carver-get-ref-height.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-get-col-depth.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_get_ref_height</code>�</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_get_col_depth</code></td></tr></table></div></body></html> ref-lqr-ret-val.html 0000644 00000007307 15034750062 0010363 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>LqrRetVal</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-pages.html#ref-const" title="Types defined by the library"><link rel="prev" href="ref-pages.html" title="Chapter�3.�LqR library API reference"><link rel="next" href="ref-lqr-col-depth.html" title="LqrColDepth"></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"><span class="type">LqrRetVal</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-pages.html">Prev</a>�</td><th width="60%" align="center">Types defined by the library</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-col-depth.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-ret-val"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>LqrRetVal — the return value of many Liquid Rescale library functions</p></div><div class="refsect1"><a name="idm1633"></a><h2>Description</h2><p> The return type of many functions in the Liquid Rescale library is <span class="type">LqrRetVal</span>, which is an <code class="literal">enum</code> type that can take these values: </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal"><span class="errorcode">LQR_OK</span></code></span></dt><dd><p> everyting OK </p></dd><dt><span class="term"><code class="literal"><span class="errorcode">LQR_ERROR</span></code></span></dt><dd><p> generic <span class="errortype">fatal</span> error </p></dd><dt><span class="term"><code class="literal"><span class="errorcode">LQR_NOMEM</span></code></span></dt><dd><p> not enough memory </p></dd><dt><span class="term"><code class="literal"><span class="errorcode">LQR_USRCANCEL</span></code></span></dt><dd><p> action cancelled by the user </p></dd></dl></div><p> </p><p> The user should handle the error values explicitly at each function call returning this type. </p></div><div class="refsect1"><a name="idm1665"></a><h2>See also</h2><p> <span class="simplelist"><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-cancel.html" title="lqr_carver_cancel"><span class="refentrytitle"><code class="function">lqr_carver_cancel</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-pages.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-pages.html#ref-const">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-col-depth.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter�3.�LqR library API reference�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�<span class="type">LqrColDepth</span></td></tr></table></div></body></html> read-out.html 0000644 00000030333 15034750062 0007156 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Reading the multi-size image</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="api-manual.html" title="Chapter�2.�LqR library API user manual"><link rel="prev" href="lqr.html" title="Liquid rescaling"><link rel="next" href="energy.html" title="Automatic feature detection"></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">Reading the multi-size image</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="lqr.html">Prev</a>�</td><th width="60%" align="center">Chapter�2.�LqR library API user manual</th><td width="20%" align="right">�<a accesskey="n" href="energy.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="read-out"></a>Reading the multi-size image</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="read-out.html#px-by-px">Pixel by pixel</a></span></dt><dt><span class="sect2"><a href="read-out.html#line-by-line">One line at a time</a></span></dt><dt><span class="sect2"><a href="read-out.html#reset">Resetting</a></span></dt></dl></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="px-by-px"></a>Pixel by pixel</h3></div></div></div><p> Once you have rescaled the image, you can read out the result through the functions: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">gboolean <b class="fsfunc">lqr_carver_scan</b>(</code></td><td> LqrCarver * <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td> gint* <var class="pdparam">x</var>, </td></tr><tr><td>�</td><td> gint* <var class="pdparam">y</var>, </td></tr><tr><td>�</td><td> guchar** <var class="pdparam">rgb</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> or </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">gboolean <b class="fsfunc">lqr_carver_scan_ext</b>(</code></td><td> LqrCarver * <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td> gint* <var class="pdparam">x</var>, </td></tr><tr><td>�</td><td> gint* <var class="pdparam">y</var>, </td></tr><tr><td>�</td><td> void** <var class="pdparam">rgb</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> Here, <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> are pointers to the varaibles which will hold the pixel coordinate, while <em class="parameter"><code>rgb</code></em> is a pointer to an array which will contain the pixel colour information. If the carver was created using the standard 8-bit constructor <code class="function">lqr_carver_new</code>, the first form can be used, otherwise you must use the extended form <code class="function">lqr_carver_scan_ext</code>. In this last case, the output pointer <em class="parameter"><code>rgb</code></em> must be passed as a pointer to <span class="type">void*</span>, but the outcome should actually be cast to a pointer to an array of the appropriate type, depending on the <code class="classname">LqrCarver</code> colour depth. </p><p> The return value is <code class="literal"><span class="returnvalue">FALSE</span></code> when the end of the image is reached, or the buffer has the wrong number of bits, <code class="literal"><span class="returnvalue">TRUE</span></code> otherwise. </p><p> Each time these functions are invoked, they will store the coordinates and rgb information in the output pointers and move to the next pixel. If they reach the end, they reset the reader and return <code class="literal"><span class="returnvalue">FALSE</span></code>. </p><p> Here is a sample code usage: </p><div class="example"><a name="ex-read-out"></a><p class="title"><b>Example�2.1.�A simple readout example</b></p><div class="example-contents"><pre class="programlisting"> gint x, y; guchar *rgb; while (lqr_carver_scan (carver, &x, &y, &rgb) { my_plot (x, y, rgb[0], rgb[1], rgb[2]); } </pre></div></div><p><br class="example-break"> In this example, it is assumed that the image has three 8-bit colour channels, and that there exist some function <code class="function">my_plot</code> which writes out the pixels somewhere. </p><p> The same readout example with different colour depth would read like this: </p><div class="example"><a name="ex-read-out-ext"></a><p class="title"><b>Example�2.2.�A simple readout example - extended version</b></p><div class="example-contents"><pre class="programlisting"> gint x, y; void *rgb; gdouble *rgb_out; while (lqr_carver_scan (carver, &x, &y, &rgb) { rgb_out = (gdouble*) rgb; my_plot (x, y, rgb_out[0], rgb_out[1], rgb_out[2]); } </pre></div></div><p><br class="example-break"> In this example it is assumed that the carver was loaded with the <code class="literal">LQR_COLDEPTH_64F</code> as the <em class="parameter"><code>colour_depth</code></em> argument in the constructor <code class="function">lqr_carver_new_ext</code>, and that it has <code class="literal">3</code> colour channels (see the <a class="link" href="generate-multi-size.html#carver-new" title="Carver object creation">constructor section</a> for details); therefore, the output is cast to type <span class="type">gdouble</span> before using it. </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p> The <em class="parameter"><code>rgb</code></em> array is owned by to the carver object, so it doesn't need initialization, as in the example. Indeed, it must be used for read-only purposes, and the content should always be copyed after each call to a scan function. </p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="line-by-line"></a>One line at a time</h3></div></div></div><p> The image can also be read one line at a time, but it is not possible to freely decide if it is to be read by row or by column. Instead, this has to be queried by calling this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">gboolean <b class="fsfunc">lqr_carver_scan_by_row</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> The function returns <code class="literal"><span class="returnvalue">TRUE</span></code> if the image is read by row, and <code class="literal"><span class="returnvalue">FALSE</span></code> if it is read by column. </p><p> Then, the image can be read through these functions: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">gboolean <b class="fsfunc">lqr_carver_scan_line</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gint* <var class="pdparam">n</var>, </td></tr><tr><td>�</td><td>guchar** <var class="pdparam">rgb</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> or </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">gboolean <b class="fsfunc">lqr_carver_scan_line_ext</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gint* <var class="pdparam">n</var>, </td></tr><tr><td>�</td><td>void** <var class="pdparam">rgb</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> These functions work exactly the same way as <code class="function">lqr_carver_scan</code> and <code class="function">lqr_carver_scan_ext</code>, but only one coordinate is stored (either the row or the column number), and the <em class="parameter"><code>rgb</code></em> array will contain a whole line. </p><p> Here is a sample code usage for the standard 8-bit case: </p><div class="example"><a name="ex-scan-line"></a><p class="title"><b>Example�2.3.�Line-by-line readout example</b></p><div class="example-contents"><pre class="programlisting"> gint n; guchar *rgb; gboolean by_row; by_row = lqr_carver_scan_by_row (carver); while (lqr_carver_scan_line (carver, &n, &rgb) { by_row ? my_plot_row (n, rgb) : my_plot_col (n, rgb); } </pre></div></div><p><br class="example-break"> where, as before, it is assumed that the <code class="function">my_plot_row</code> and <code class="function">my_plot_col</code> functions have been previously defined and "know what to do". </p><p> The extended version for images with more colour depth is very similar, it only requires an additional cast: </p><div class="example"><a name="ex-scan-line-ext"></a><p class="title"><b>Example�2.4.�Line-by-line readout example - extended version</b></p><div class="example-contents"><pre class="programlisting"> gint n; void *rgb; guchar *rgb_out; gboolean by_row; by_row = lqr_carver_scan_by_row (carver); while (lqr_carver_scan_line_ext (carver, &n, &rgb) { rgb_out = (gboolean*) rgb; by_row ? my_plot_row (n, rgb_out) : my_plot_col (n, rgb_out); } </pre></div></div><p><br class="example-break"> </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="reset"></a>Resetting</h3></div></div></div><p> Normally, it is not needed to reset the image scan. However, if the scan has been stopped at same intermediate step for some reason, the following function can be used to restart from the beginning: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">lqr_carver_scan_reset</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="lqr.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="api-manual.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="energy.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Liquid rescaling�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Automatic feature detection</td></tr></table></div></body></html> ref-lqr-vmap-new.html 0000644 00000013670 15034750062 0010543 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_vmap_new</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-vmaps.html" title="Visibiliy maps"><link rel="prev" href="ref-vmaps.html" title="Visibiliy maps"><link rel="next" href="ref-lqr-vmap-destroy.html" title="lqr_vmap_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_vmap_new</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-vmaps.html">Prev</a>�</td><th width="60%" align="center">Visibiliy maps</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-vmap-destroy.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-vmap-new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_vmap_new — the <code class="classname">LqrVMap</code> object constructor</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">LqrVMap* <b class="fsfunc">lqr_vmap_new</b>(</code></td><td>gint* <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">depth</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">orientation</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3621"></a><h2>Description</h2><p> The function <code class="function">lqr_vmap_new</code> is the constructor for <code class="classname">LqrVMap</code> objects. It can be used to convert saved data in a format which can be loaded in an <code class="classname">LqrCarver</code> object. </p><p> The parameter <em class="parameter"><code>buffer</code></em> must point to an an array of <code class="literal"><em class="parameter"><code>width</code></em> * <em class="parameter"><code>height</code></em></code> <span class="type">int</span>s holding the visibility information. </p><p> The parameter <em class="parameter"><code>depth</code></em> represents the maximum possible amount of rescaling with the given map. </p><p> The parameter <em class="parameter"><code>orientation</code></em> must be <code class="literal">0</code> if the map is to be used for horizontal rescaling, <code class="literal">1</code> if it is to be used for vertical rescaling. </p></div><div class="refsect1"><a name="idm3639"></a><h2>Visibility maps format</h2><p> The <em class="parameter"><code>buffer</code></em> must be an array of integers of size <code class="literal"><em class="parameter"><code>width</code></em> * <em class="parameter"><code>height</code></em></code>. For an horizontally oriented visibility map, the format is as such: each row must contain all values between 1 and <em class="parameter"><code>depth</code></em> (included) exactly once, with low values indicating the pixels which will be operated on first during rescaling. All other pixels must be 0, which means that they won't be affected by rescaling. Such a map allows for horizontal rescaling in the range from <code class="literal"><em class="parameter"><code>width</code></em> - <em class="parameter"><code>depth</code></em></code> to <code class="literal"><em class="parameter"><code>width</code></em> + <em class="parameter"><code>depth</code></em></code>. The same applies to vertically oriented visibility maps, with columns in place of rows and <em class="parameter"><code>height</code></em> in place of <em class="parameter"><code>width</code></em>. </p></div><div class="refsect1"><a name="idm3655"></a><h2>Return value</h2><p> The function returns the newly created <code class="classname">LqrVMap</code> if successful, or <code class="literal"><span class="returnvalue">NULL</span></code> in case of insufficient memory. </p></div><div class="refsect1"><a name="idm3661"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-vmap-destroy.html" title="lqr_vmap_destroy"><span class="refentrytitle"><code class="function">lqr_vmap_destroy</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-load.html" title="lqr_vmap_load"><span class="refentrytitle"><code class="function">lqr_vmap_load</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-vmaps.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-vmaps.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-vmap-destroy.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Visibiliy maps�</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_vmap_destroy</code></td></tr></table></div></body></html> app-new-0-3.html 0000644 00000005601 15034750062 0007302 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>New symbols in version 0.3</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="app-new.html" title="Appendix�A.�API changes in new versions of the library"><link rel="prev" href="app-new.html" title="Appendix�A.�API changes in new versions of the library"><link rel="next" href="app-new-0-2.html" title="New symbols in version 0.2"></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">New symbols in version 0.3</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="app-new.html">Prev</a>�</td><th width="60%" align="center">Appendix�A.�API changes in new versions of the library</th><td width="20%" align="right">�<a accesskey="n" href="app-new-0-2.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="app-new-0-3"></a>New symbols in version 0.3</h2></div></div></div><p> </p><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="link" href="ref-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"><code class="function">lqr_carver_get_enl_step</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"><code class="function">lqr_carver_set_enl_step</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-get-ref-width.html" title="lqr_carver_get_ref_width"><code class="function">lqr_carver_get_ref_width</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-get-ref-height.html" title="lqr_carver_get_ref_height"><code class="function">lqr_carver_get_ref_height</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-get-orientation.html" title="lqr_carver_get_orientation"><code class="function">lqr_carver_get_orientation</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-get-depth.html" title="lqr_carver_get_depth"><code class="function">lqr_carver_get_depth</code></a></td></tr></table><p> </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="app-new.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="app-new.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="app-new-0-2.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix�A.�API changes in new versions of the library�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�New symbols in version 0.2</td></tr></table></div></body></html> ref-lqr-vmap-get-depth.html 0000644 00000007706 15034750062 0011636 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_vmap_get_depth</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-vmaps.html" title="Visibiliy maps"><link rel="prev" href="ref-lqr-vmap-get-data.html" title="lqr_vmap_get_data"><link rel="next" href="ref-lqr-vmap-get-width.html" title="lqr_vmap_get_width"></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_vmap_get_depth</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-vmap-get-data.html">Prev</a>�</td><th width="60%" align="center">Visibiliy maps</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-vmap-get-width.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-vmap-get-depth"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_vmap_get_depth — get the depth of an <code class="classname">LqrVMap</code> object</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">gint <b class="fsfunc">lqr_vmap_get_depth</b>(</code></td><td>LqrVMap* <var class="pdparam">vmap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3762"></a><h2>Description</h2><p> The function <code class="function">lqr_vmap_get_depth</code> returns the depth of the <code class="classname">LqrVMap</code> object pointed to by <em class="parameter"><code>vmap</code></em>, i.e. the maximum scaling allowed by it. </p><p> See the <code class="classname">LqrVMap</code> objects format description in the page for <a class="link" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"><code class="classname">LqrVMap</code> constructor and destructor</a>. </p></div><div class="refsect1"><a name="idm3772"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"><span class="refentrytitle"><code class="function">lqr_vmap_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-data.html" title="lqr_vmap_get_data"><span class="refentrytitle"><code class="function">lqr_vmap_get_data</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-width.html" title="lqr_vmap_get_width"><span class="refentrytitle"><code class="function">lqr_vmap_get_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-height.html" title="lqr_vmap_get_height"><span class="refentrytitle"><code class="function">lqr_vmap_get_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-orientation.html" title="lqr_vmap_get_orientation"><span class="refentrytitle"><code class="function">lqr_vmap_get_orientation</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-lqr-vmap-get-data.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-vmaps.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-vmap-get-width.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_vmap_get_data</code>�</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_vmap_get_width</code></td></tr></table></div></body></html> ref-lqr-carver-new.html 0000644 00000016412 15034750062 0011057 0 ustar 00 <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.79.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="idm1817"></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 class="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="idm1871"></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="idm1877"></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> ref-lqr-carver-init.html 0000644 00000011166 15034750062 0011232 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_init</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-destroy.html" title="lqr_carver_destroy"><link rel="next" href="ref-lqr-carver-set-image-type.html" title="lqr_carver_set_image_type"></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_init</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-destroy.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-image-type.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-init"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_init — activates an <code class="classname">LqrCarver</code> object</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">LqrRetVal <b class="fsfunc">lqr_carver_init</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">delta_x</var>, </td></tr><tr><td>�</td><td>gfloat <var class="pdparam">rigidity</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm1948"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_init</code> initialises the <code class="classname">LqrCarver</code> pointed to by <em class="parameter"><code>carver</code></em>, so that it can compute the visibility maps as needed upon calls of <code class="function">lqr_carver_resize</code>. </p><p> The parameter <em class="parameter"><code>delta_x</code></em> controls the maximum transversal step a seam can make. A value of 0 means straight seams. Normally, it is set to 1. </p><p> The parameter <em class="parameter"><code>rigidity</code></em> can be used to add a negative bias to non-straight seams, and it is normally set to 0. </p><p> Visibility maps must not be loaded with the function <code class="function">lqr_vmap_load</code> when using this function, neither before nor after invoking it. </p></div><div class="refsect1"><a name="idm1961"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm1964"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-carver-new.html" title="lqr_carver_new"><span class="refentrytitle"><code class="function">lqr_carver_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-load.html" title="lqr_vmap_load"><span class="refentrytitle"><code class="function">lqr_vmap_load</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-lqr-carver-destroy.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-set-image-type.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_destroy</code>�</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_set_image_type</code></td></tr></table></div></body></html> ref-carve.html 0000644 00000025265 15034750062 0007320 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Carver objects</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-pages.html" title="Chapter�3.�LqR library API reference"><link rel="prev" href="ref-lqr-image-type.html" title="LqrImageType"><link rel="next" href="ref-lqr-carver-new.html" title="lqr_carver_new"></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">Carver objects</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-image-type.html">Prev</a>�</td><th width="60%" align="center">Chapter�3.�LqR library API reference</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-new.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ref-carve"></a>Carver objects</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="ref-lqr-carver-new.html"><code class="function">lqr_carver_new</code></a></span><span class="refpurpose"> — the <code class="classname">LqrCarver</code> object constructors</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-destroy.html"><code class="function">lqr_carver_destroy</code></a></span><span class="refpurpose"> — the <code class="classname">LqrCarver</code> object destructor</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-init.html"><code class="function">lqr_carver_init</code></a></span><span class="refpurpose"> — activates an <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-set-image-type.html"><code class="function">lqr_carver_set_image_type</code></a></span><span class="refpurpose"> — sets the image type of an <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-set-alpha-channel.html"><code class="function">lqr_carver_set_alpha_channel</code></a></span><span class="refpurpose"> — sets the alpha channel index in a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-set-black-channel.html"><code class="function">lqr_carver_set_black_channel</code></a></span><span class="refpurpose"> — sets the black channel index in a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-resize.html"><code class="function">lqr_carver_resize</code></a></span><span class="refpurpose"> — liquid rescale a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-flatten.html"><code class="function">lqr_carver_flatten</code></a></span><span class="refpurpose"> — flatten a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-cancel.html"><code class="function">lqr_carver_cancel</code></a></span><span class="refpurpose"> — cancel ongoing operations on a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-scan-reset.html"><code class="function">lqr_carver_scan_reset</code></a></span><span class="refpurpose"> — reset the readout cursor of a multi-size image</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-scan.html"><code class="function">lqr_carver_scan</code></a></span><span class="refpurpose"> — read out a multi-size image one pixel at a time</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-scan-by-row.html"><code class="function">lqr_carver_scan_by_row</code></a></span><span class="refpurpose"> — tells if the image in <code class="classname">LqrCarver</code> will be scanned by row or by column</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-scan-line.html"><code class="function">lqr_carver_scan_line</code></a></span><span class="refpurpose"> — read out a multi-size image one line at a time</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-get-width.html"><code class="function">lqr_carver_get_width</code></a></span><span class="refpurpose"> — get the current width of a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-get-height.html"><code class="function">lqr_carver_get_height</code></a></span><span class="refpurpose"> — get the current height of a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-get-ref-width.html"><code class="function">lqr_carver_get_ref_width</code></a></span><span class="refpurpose"> — get the reference width of a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-get-ref-height.html"><code class="function">lqr_carver_get_ref_height</code></a></span><span class="refpurpose"> — get the reference height of a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-get-channels.html"><code class="function">lqr_carver_get_channels</code></a></span><span class="refpurpose"> — get the number of channels in a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-get-col-depth.html"><code class="function">lqr_carver_get_col_depth</code></a></span><span class="refpurpose"> — get the colour depth of a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-get-image-type.html"><code class="function">lqr_carver_get_image_type</code></a></span><span class="refpurpose"> — get the image type of a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-get-enl-step.html"><code class="function">lqr_carver_get_enl_step</code></a></span><span class="refpurpose"> — get the enlargement step of a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-get-orientation.html"><code class="function">lqr_carver_get_orientation</code></a></span><span class="refpurpose"> — get the orientation of a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-get-depth.html"><code class="function">lqr_carver_get_depth</code></a></span><span class="refpurpose"> — get the depth of a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-set-enl-step.html"><code class="function">lqr_carver_set_enl_step</code></a></span><span class="refpurpose"> — set the enlargement step of a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-set-resize-order.html"><code class="function">lqr_carver_set_resize_order</code></a></span><span class="refpurpose"> — set <code class="classname">LqrCarver</code> object resize order</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-set-dump-vmaps.html"><code class="function">lqr_carver_set_dump_vmaps</code></a></span><span class="refpurpose"> — set the visibility maps autodump for an <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-set-side-switch-frequency.html"><code class="function">lqr_carver_set_side_switch_frequency</code></a></span><span class="refpurpose"> — set <code class="classname">LqrCarver</code> object side switch frequency</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-set-progress.html"><code class="function">lqr_carver_set_progress</code></a></span><span class="refpurpose"> — set the progress report function for an <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-set-preserve-input-image.html"><code class="function">lqr_carver_set_preserve_input_image</code></a></span><span class="refpurpose"> — set a flag to preserve the buffer passed to a <code class="classname">LqrCarver</code> object upon creation</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-set-use-cache.html"><code class="function">lqr_carver_set_use_cache</code></a></span><span class="refpurpose"> — enable/disable <code class="classname">LqrCarver</code> object cache</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-attach.html"><code class="function">lqr_carver_attach</code></a></span><span class="refpurpose"> — attach an <code class="classname">LqrCarver</code> to another <code class="classname">LqrCarver</code></span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-list-start.html"><code class="function">lqr_carver_list_start</code></a></span><span class="refpurpose"> — get the staritng point of the attachement list in an <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-list-current.html"><code class="function">lqr_carver_list_current</code></a></span><span class="refpurpose"> — get current <code class="classname">LqrCarver</code> object in a <code class="classname">LqrCarverList</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-list-next.html"><code class="function">lqr_carver_list_next</code></a></span><span class="refpurpose"> — advance the <code class="classname">LqrCarverList</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-list-foreach.html"><code class="function">lqr_carver_list_foreach</code></a></span><span class="refpurpose"> — perform operations on all <code class="classname">LqrCarver</code> objects in an <code class="classname">LqrCarverList</code> object</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref-lqr-image-type.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-pages.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-carver-new.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="type">LqrImageType</span>�</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_new</code></td></tr></table></div></body></html> ref-lqr-carver-get-height.html 0000644 00000010271 15034750062 0012310 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_get_height</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-get-width.html" title="lqr_carver_get_width"><link rel="next" href="ref-lqr-carver-get-ref-width.html" title="lqr_carver_get_ref_width"></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_get_height</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-get-width.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-get-ref-width.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-get-height"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_get_height — get the current height of a <code class="classname">LqrCarver</code> object</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">gint <b class="fsfunc">lqr_carver_get_height</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2566"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_get_height</code> returns the current height of the image contained in the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>, in pixel units. </p></div><div class="refsect1"><a name="idm2572"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-get-width.html" title="lqr_carver_get_width"><span class="refentrytitle"><code class="function">lqr_carver_get_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-width.html" title="lqr_carver_get_ref_width"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-height.html" title="lqr_carver_get_ref_height"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-channels.html" title="lqr_carver_get_channels"><span class="refentrytitle"><code class="function">lqr_carver_get_channels</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-col-depth.html" title="lqr_carver_get_col_depth"><span class="refentrytitle"><code class="function">lqr_carver_get_col_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_get_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-orientation.html" title="lqr_carver_get_orientation"><span class="refentrytitle"><code class="function">lqr_carver_get_orientation</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-lqr-carver-get-width.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-get-ref-width.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_get_width</code>�</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_get_ref_width</code></td></tr></table></div></body></html> ref-lqr-rwindow-read.html 0000644 00000013420 15034750062 0011404 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_rwindow_read</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-energy.html" title="Energy"><link rel="prev" href="ref-lqr-carver-get-energy.html" title="lqr_carver_get_energy"><link rel="next" href="ref-lqr-rwindow-get-read-t.html" title="lqr_rwindow_get_read_t"></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_rwindow_read</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-get-energy.html">Prev</a>�</td><th width="60%" align="center">Energy</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-rwindow-get-read-t.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-rwindow-read"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_rwindow_read — read the content of a <code class="classname">LqrReadingWindow</code> object</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">gfloat <b class="fsfunc">lqr_rwindow_read</b>(</code></td><td>LqrReadingWindow* <var class="pdparam">rwindow</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">x</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">y</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">channel</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4557"></a><h2>Description</h2><p> The function <code class="function">lqr_rwindow_read</code> returns the content of the reading window <em class="parameter"><code>rwindow</code></em> at point <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> and at channel <em class="parameter"><code>channel</code></em>. </p><p> The coordinates <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> are relative to the <em class="parameter"><code>rwindow</code></em> centre, and they both can range from <code class="literal">-radius</code> to <code class="literal">radius</code> (extremes included), where <code class="literal">radius</code> can be obtained with the function <a class="xref" href="ref-lqr-rwindow-get-radius.html" title="lqr_rwindow_get_radius"><span class="refentrytitle"><code class="function">lqr_rwindow_get_radius</code></span>(3)</a>. </p><p> The function returns <code class="literal">0</code> when the coordinates are out of range, either because they are beyond the <em class="parameter"><code>rwindow</code></em> radius or because they are outside the image boundary. </p><p> The <em class="parameter"><code>channel</code></em> parameter specifies which channel to read out; depending on the <em class="parameter"><code>rwindow</code></em> reader type, the range and meaning of this parameter changes: for the cases <code class="literal">LQR_ER_BRIGHTNESS</code> and <code class="literal">LQR_ER_LUMA</code> it must be <code class="literal">0</code>, because the readout consists of a single channel, for <code class="literal">LQR_ER_RGBA</code> it must be between <code class="literal">0</code> and <code class="literal">3</code> (and then the readout will contain the RGBA information), while for <code class="literal">LQR_ER_CUSTOM</code> it must be one of the original image channels. </p></div><div class="refsect1"><a name="idm4586"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-set-energy-function.html" title="lqr_carver_set_energy_function"><span class="refentrytitle"><code class="function">lqr_carver_set_energy_function</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-read-t.html" title="lqr_rwindow_get_read_t"><span class="refentrytitle"><code class="function">lqr_rwindow_get_read_t</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-radius.html" title="lqr_rwindow_get_radius"><span class="refentrytitle"><code class="function">lqr_rwindow_get_radius</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-channels.html" title="lqr_rwindow_get_channels"><span class="refentrytitle"><code class="function">lqr_rwindow_get_channels</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-lqr-carver-get-energy.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-energy.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-rwindow-get-read-t.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_get_energy</code>�</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_rwindow_get_read_t</code></td></tr></table></div></body></html> ref-lqr-carver-set-enl-step.html 0000644 00000014523 15034750062 0012607 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_set_enl_step</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-get-depth.html" title="lqr_carver_get_depth"><link rel="next" href="ref-lqr-carver-set-resize-order.html" title="lqr_carver_set_resize_order"></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_set_enl_step</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-get-depth.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-resize-order.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-set-enl-step"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_set_enl_step — set the enlargement step of a <code class="classname">LqrCarver</code> object</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">LqrRetVal <b class="fsfunc">lqr_carver_set_enl_step</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gfloat <var class="pdparam">enl_step</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2988"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_set_enl_step</code> sets the enlargement step of the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> to the value specified in <em class="parameter"><code>enl_step</code></em>, which must be strictly greater than 1 and less than 2. </p><p> The enlargement step is the maximum enlargement ratio (with respect to either the original width or original height of <em class="parameter"><code>carver</code></em>) which the function <code class="function">lqr_carver_resize</code> applies in a single step; if that function is asked a greater enlargement, it divides the process in multiple steps (and updates the original sizes accordingly at each new step - these can be readout at any time with <a class="xref" href="ref-lqr-carver-get-ref-width.html" title="lqr_carver_get_ref_width"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_width</code></span>(3)</a> and <a class="xref" href="ref-lqr-carver-get-ref-height.html" title="lqr_carver_get_ref_height"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_height</code></span>(3)</a>). </p><p> The default value for new <code class="classname">LqrCarver</code> objects is 2.0. </p></div><div class="refsect1"><a name="idm3002"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. <code class="literal"><span class="errorcode">LQR_ERROR</span></code> is returned if the <em class="parameter"><code>enl_step</code></em> parameter is out of bounds. </p></div><div class="refsect1"><a name="idm3008"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_get_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-width.html" title="lqr_carver_get_ref_width"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-height.html" title="lqr_carver_get_ref_height"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><span class="refentrytitle"><code class="function">lqr_carver_set_dump_vmaps</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-side-switch-frequency.html" title="lqr_carver_set_side_switch_frequency"><span class="refentrytitle"><code class="function">lqr_carver_set_side_switch_frequency</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</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>, <a class="xref" href="ref-lqr-carver-set-use-cache.html" title="lqr_carver_set_use_cache"><span class="refentrytitle"><code class="function">lqr_carver_set_use_cache</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-lqr-carver-get-depth.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-set-resize-order.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_get_depth</code>�</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_set_resize_order</code></td></tr></table></div></body></html> ref-lqr-carver-list-start.html 0000644 00000011310 15034750062 0012364 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_list_start</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-attach.html" title="lqr_carver_attach"><link rel="next" href="ref-lqr-carver-list-current.html" title="lqr_carver_list_current"></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_list_start</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-attach.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-list-current.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-list-start"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_list_start — get the staritng point of the attachement list in an <code class="classname">LqrCarver</code> object</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">LqrCarverList* <b class="fsfunc">lqr_carver_list_start</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3409"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_list_start</code> returns the stating point of the <code class="classname">LqrCarverList</code> object associated with the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>, which is used to keep track of the <code class="classname">LqrCarver</code> objects attached to it. </p><p> The returned value is <code class="literal"><span class="returnvalue">NULL</span></code> if there are no attached carvers. </p><p> Use the functions <a class="xref" href="ref-lqr-carver-list-current.html" title="lqr_carver_list_current"><span class="refentrytitle"><code class="function">lqr_carver_list_current</code></span>(3)</a> and <a class="xref" href="ref-lqr-carver-list-next.html" title="lqr_carver_list_next"><span class="refentrytitle"><code class="function">lqr_carver_list_next</code></span>(3)</a> to access the list element individually, or the function <a class="xref" href="ref-lqr-carver-list-foreach.html" title="lqr_carver_list_foreach"><span class="refentrytitle"><code class="function">lqr_carver_list_foreach</code></span>(3)</a> to operate on whole lists. </p></div><div class="refsect1"><a name="idm3424"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-attach.html" title="lqr_carver_attach"><span class="refentrytitle"><code class="function">lqr_carver_attach</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-current.html" title="lqr_carver_list_current"><span class="refentrytitle"><code class="function">lqr_carver_list_current</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-next.html" title="lqr_carver_list_next"><span class="refentrytitle"><code class="function">lqr_carver_list_next</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-foreach.html" title="lqr_carver_list_foreach"><span class="refentrytitle"><code class="function">lqr_carver_list_foreach</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-lqr-carver-attach.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-list-current.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_attach</code>�</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_list_current</code></td></tr></table></div></body></html> ref-lqr-progress-set-update.html 0000644 00000014540 15034750062 0012723 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_progress_set_update</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-progress.html" title="Progress reports"><link rel="prev" href="ref-lqr-progress-set-init.html" title="lqr_progress_set_init"><link rel="next" href="ref-lqr-progress-set-end.html" title="lqr_progress_set_end"></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_progress_set_update</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-progress-set-init.html">Prev</a>�</td><th width="60%" align="center">Progress reports</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-end.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-progress-set-update"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_progress_set_update — execude custom code at regular steps during each rescaling operation</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">LqrRetVal <b class="fsfunc">lqr_progress_set_update</b>(</code></td><td>LqrProgress* <var class="pdparam">p</var>, </td></tr><tr><td>�</td><td>LqrProgressFuncUpdate <var class="pdparam">update_func</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm5292"></a><h2>Description</h2><p> The function <code class="function">lqr_progress_set_update</code> sets the hook <em class="parameter"><code>update_func</code></em> to the <code class="classname">LqrProgress</code> object pointed to by <em class="parameter"><code>p</code></em>. </p><p> The function <em class="parameter"><code>update_func</code></em> is of type <code class="classname">LqrProgressFuncUpdate</code>, whose prototype is defined by: </p><pre class="programlisting"> typedef LqrRetVal (*LqrProgressFuncUpdate) (gdouble completion_percentage); </pre><p> Each time that the function <a class="xref" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a> performs a rescale operation (recall that it can perform more than one rescale operation at each call) this function will be called at regular intervale, with the current completion percentage <em class="parameter"><code>completion_percentage</code></em> as an argument. </p><p> The update step can be set with the function <a class="xref" href="ref-lqr-progress-set-update-step.html" title="lqr_progress_set_update_step"><span class="refentrytitle"><code class="function">lqr_progress_set_update_step</code></span>(3)</a>. </p></div><div class="refsect1"><a name="idm5307"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm5310"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-progress-new.html" title="lqr_progress_new"><span class="refentrytitle"><code class="function">lqr_progress_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init.html" title="lqr_progress_set_init"><span class="refentrytitle"><code class="function">lqr_progress_set_init</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end.html" title="lqr_progress_set_end"><span class="refentrytitle"><code class="function">lqr_progress_set_end</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init-width-message.html" title="lqr_progress_set_init_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_width_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init-height-message.html" title="lqr_progress_set_init_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_height_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end-width-message.html" title="lqr_progress_set_end_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_width_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end-height-message.html" title="lqr_progress_set_end_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_height_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update-step.html" title="lqr_progress_set_update_step"><span class="refentrytitle"><code class="function">lqr_progress_set_update_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</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-lqr-progress-set-init.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-progress.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-end.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_progress_set_init</code>�</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_progress_set_end</code></td></tr></table></div></body></html> ref-lqr-vmap-load.html 0000644 00000010766 15034750062 0010674 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_vmap_load</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-vmaps.html" title="Visibiliy maps"><link rel="prev" href="ref-lqr-vmap-internal-dump.html" title="lqr_vmap_internal_dump"><link rel="next" href="ref-lqr-vmap-list-start.html" title="lqr_vmap_list_start"></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_vmap_load</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-vmap-internal-dump.html">Prev</a>�</td><th width="60%" align="center">Visibiliy maps</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-vmap-list-start.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-vmap-load"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_vmap_load — load an <code class="classname">LqrVMap</code> object into an <code class="classname">LqrCarver</code> object</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">LqrRetVal <b class="fsfunc">lqr_vmap_load</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>LqrVMap* <var class="pdparam">vmap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4004"></a><h2>Description</h2><p> The function <code class="function">lqr_vmap_load</code> loads the visibility map contained in the <code class="classname">LqrVMap</code> object pointed to by <em class="parameter"><code>vmap</code></em> in the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>. </p><p> It can only be called over uninitialised carver objects, therefore care must be taken not to exceed the loaded map depth when resizing (see the <code class="classname">LqrVMap</code> objects format description in the page for <a class="xref" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"><span class="refentrytitle"><code class="function">lqr_vmap_new</code></span>(3)</a>). </p><div class="refsect1"><a name="idm4015"></a></div><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm4018"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"><span class="refentrytitle"><code class="function">lqr_vmap_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-dump.html" title="lqr_vmap_dump"><span class="refentrytitle"><code class="function">lqr_vmap_dump</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-internal-dump.html" title="lqr_vmap_internal_dump"><span class="refentrytitle"><code class="function">lqr_vmap_internal_dump</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><span class="refentrytitle"><code class="function">lqr_carver_set_dump_vmaps</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-lqr-vmap-internal-dump.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-vmaps.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-vmap-list-start.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_vmap_internal_dump</code>�</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_vmap_list_start</code></td></tr></table></div></body></html> ref-lqr-carver-set-dump-vmaps.html 0000644 00000017203 15034750062 0013147 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_set_dump_vmaps</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-set-resize-order.html" title="lqr_carver_set_resize_order"><link rel="next" href="ref-lqr-carver-set-side-switch-frequency.html" title="lqr_carver_set_side_switch_frequency"></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_set_dump_vmaps</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-set-resize-order.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-side-switch-frequency.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-set-dump-vmaps"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_set_dump_vmaps, lqr_carver_set_no_dump_vmaps — set the visibility maps autodump for an <code class="classname">LqrCarver</code> object</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">void <b class="fsfunc">lqr_carver_set_dump_vmaps</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</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">void <b class="fsfunc">lqr_carver_set_no_dump_vmaps</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3101"></a><h2>Description</h2><p> Invoking function <code class="function">lqr_carver_set_dump_vmaps</code> over the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> has the effect of activating the automatic dumping of visibility maps at each rescale operation (which by default is turned off). </p><p> Rescale operations involving both directions will dump two maps. </p><p> The dumped maps will be attached to the <code class="classname">LqrCarver</code> object and can be accessed at any later time using the functions <a class="xref" href="ref-lqr-vmap-list-foreach.html" title="lqr_vmap_list_foreach"><span class="refentrytitle"><code class="function">lqr_vmap_list_foreach</code></span>(3)</a> or a combination of <a class="xref" href="ref-lqr-vmap-list-start.html" title="lqr_vmap_list_start"><span class="refentrytitle"><code class="function">lqr_vmap_list_start</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-list-current.html" title="lqr_vmap_list_current"><span class="refentrytitle"><code class="function">lqr_vmap_list_current</code></span>(3)</a> and <a class="xref" href="ref-lqr-vmap-list-next.html" title="lqr_vmap_list_next"><span class="refentrytitle"><code class="function">lqr_vmap_list_next</code></span>(3)</a>. </p><p> Using this setting is pointless if the <code class="classname">LqrCarver</code> object is not initialised. </p><p> The function <code class="function">lqr_carver_set_no_dump_vmaps</code> reverts the effect of the previous one (but the maps dumped so far will be kept). </p><p> Note that it is also possible to dump the visibility maps manually; however, using the automatic dump is the only way to get intermidiate maps when the function <a class="xref" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a> performs the rescaling in both directions, or in more than one step. </p></div><div class="refsect1"><a name="idm3120"></a><h2>See also</h2><p> <span class="simplelist"><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-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_set_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-resize-order.html" title="lqr_carver_set_resize_order"><span class="refentrytitle"><code class="function">lqr_carver_set_resize_order</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-side-switch-frequency.html" title="lqr_carver_set_side_switch_frequency"><span class="refentrytitle"><code class="function">lqr_carver_set_side_switch_frequency</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</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>, <a class="xref" href="ref-lqr-vmap-list-start.html" title="lqr_vmap_list_start"><span class="refentrytitle"><code class="function">lqr_vmap_list_start</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-list-current.html" title="lqr_vmap_list_current"><span class="refentrytitle"><code class="function">lqr_vmap_list_current</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-list-next.html" title="lqr_vmap_list_next"><span class="refentrytitle"><code class="function">lqr_vmap_list_next</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-list-foreach.html" title="lqr_vmap_list_foreach"><span class="refentrytitle"><code class="function">lqr_vmap_list_foreach</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-use-cache.html" title="lqr_carver_set_use_cache"><span class="refentrytitle"><code class="function">lqr_carver_set_use_cache</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-lqr-carver-set-resize-order.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-set-side-switch-frequency.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_set_resize_order</code>�</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_set_side_switch_frequency</code></td></tr></table></div></body></html> ref-lqr-carver-scan-by-row.html 0000644 00000010550 15034750062 0012424 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_scan_by_row</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-scan.html" title="lqr_carver_scan"><link rel="next" href="ref-lqr-carver-scan-line.html" title="lqr_carver_scan_line"></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_scan_by_row</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-scan.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-scan-line.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-scan-by-row"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_scan_by_row — tells if the image in <code class="classname">LqrCarver</code> will be scanned by row or by column</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">gboolean <b class="fsfunc">lqr_carver_scan_by_row</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2411"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_scan_by_row</code> must be used before calling the functions <a class="link" href="ref-lqr-carver-scan-line.html" title="lqr_carver_scan_line"><code class="function">lqr_carver_scan_line</code></a> and <a class="link" href="ref-lqr-carver-scan-line.html" title="lqr_carver_scan_line"><code class="function">lqr_carver_scan_line_ext</code></a>, in order to ascertain if those functions will scan the multi-size image contained in the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> by row or by column, which depends on which was last rescaling direction and cannot be controlled directly by the user. </p></div><div class="refsect1"><a name="idm2421"></a><h2>Return value</h2><p> This function returns <code class="literal"><span class="returnvalue">TRUE</span></code> in case the image is going to be scanned by row, <code class="literal"><span class="returnvalue">FALSE</span></code> in case it is going to be scanned by column; </p></div><div class="refsect1"><a name="idm2428"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-scan-reset.html" title="lqr_carver_scan_reset"><span class="refentrytitle"><code class="function">lqr_carver_scan_reset</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-scan.html" title="lqr_carver_scan"><span class="refentrytitle"><code class="function">lqr_carver_scan</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-scan-line.html" title="lqr_carver_scan_line"><span class="refentrytitle"><code class="function">lqr_carver_scan_line</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-lqr-carver-scan.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-scan-line.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_scan</code>�</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_scan_line</code></td></tr></table></div></body></html> ref-lqr-carver-destroy.html 0000644 00000007772 15034750062 0011770 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_destroy</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-new.html" title="lqr_carver_new"><link rel="next" href="ref-lqr-carver-init.html" title="lqr_carver_init"></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_destroy</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-new.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-init.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-destroy"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_destroy — the <code class="classname">LqrCarver</code> object destructor</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">void <b class="fsfunc">lqr_carver_destroy</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm1908"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_destroy</code> destroys the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>, and all of its attched components (visibility maps and attached carvers). It must never be invoked over a carver which is attached to another one. </p><p> This function will not release the memory buffer passed to <a class="xref" href="ref-lqr-carver-new.html" title="lqr_carver_new"><span class="refentrytitle"><code class="function">lqr_carver_new</code></span>(3)</a> if it was protected by calling <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>. </p></div><div class="refsect1"><a name="idm1917"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-new.html" title="lqr_carver_new"><span class="refentrytitle"><code class="function">lqr_carver_new</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>, <a class="xref" href="ref-lqr-vmap-destroy.html" title="lqr_vmap_destroy"><span class="refentrytitle"><code class="function">lqr_vmap_destroy</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-lqr-carver-new.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-init.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_new</code>�</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_init</code></td></tr></table></div></body></html> ref-lqr-carver-flatten.html 0000644 00000011773 15034750062 0011730 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_flatten</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-resize.html" title="lqr_carver_resize"><link rel="next" href="ref-lqr-carver-cancel.html" title="lqr_carver_cancel"></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_flatten</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-resize.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-cancel.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-flatten"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_flatten — flatten a <code class="classname">LqrCarver</code> object</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">LqrRetVal <b class="fsfunc">lqr_carver_flatten</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2209"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_flatten</code> can be used to discard the visibility map information and flatten the multi-size image contained in the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> to its current state. </p><p> It will also reset the internally stored original width and height, as if the image was just loaded in the <code class="classname">LqrCarver</code> object. </p><p> This function must only be invoked over initialised <code class="classname">LqrCarver</code> objects. </p><p> This function is called internally each time the rescaling direction changes, or at each new step in a multiple-step enlargement, but, when calling it manually, the discarded visibility map will not be dumped automatically by it; use the functions <a class="xref" href="ref-lqr-vmap-dump.html" title="lqr_vmap_dump"><span class="refentrytitle"><code class="function">lqr_vmap_dump</code></span>(3)</a> or <a class="xref" href="ref-lqr-vmap-internal-dump.html" title="lqr_vmap_internal_dump"><span class="refentrytitle"><code class="function">lqr_vmap_internal_dump</code></span>(3)</a> in order to save it before invoking this function. </p></div><div class="refsect1"><a name="idm2222"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. Errors can occur for non-initialised <code class="classname">LqrCarver</code> objects or in case of insufficient memory. </p></div><div class="refsect1"><a name="idm2226"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></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-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-cancel.html" title="lqr_carver_cancel"><span class="refentrytitle"><code class="function">lqr_carver_cancel</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-lqr-carver-resize.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-cancel.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_resize</code>�</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_cancel</code></td></tr></table></div></body></html> ref-lqr-carver-set-resize-order.html 0000644 00000012135 15034750062 0013467 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_set_resize_order</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"><link rel="next" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"></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_set_resize_order</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-set-enl-step.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-dump-vmaps.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-set-resize-order"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_set_resize_order — set <code class="classname">LqrCarver</code> object resize order</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">void <b class="fsfunc">lqr_carver_set_resize_order</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>LqrResizeOrder <var class="pdparam">resize_order</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3049"></a><h2>Description</h2><p> When the function <a class="xref" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a> is invoked and both the horizontal and vertical sizes are different from the current ones, the rescaling occurs first in one direction and then in the other. </p><p> The function <code class="function">lqr_carver_set_resize_order</code> can be used to set which direction to rescale first for the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>. The parameter <em class="parameter"><code>resize_order</code></em> can take either the value <code class="literal">LQR_RES_ORDER_HOR</code> (horizontal rescale first) or <code class="literal">LQR_RES_ORDER_VERT</code> (vertical rescale first). By default, when an <code class="classname">LqrCarver</code> object is created, the value is set to <code class="literal">LQR_RES_ORDER_HOR</code> </p></div><div class="refsect1"><a name="idm3062"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_set_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><span class="refentrytitle"><code class="function">lqr_carver_set_dump_vmaps</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-side-switch-frequency.html" title="lqr_carver_set_side_switch_frequency"><span class="refentrytitle"><code class="function">lqr_carver_set_side_switch_frequency</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</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>, <a class="xref" href="ref-lqr-carver-set-use-cache.html" title="lqr_carver_set_use_cache"><span class="refentrytitle"><code class="function">lqr_carver_set_use_cache</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-lqr-carver-set-enl-step.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-set-dump-vmaps.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_set_enl_step</code>�</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_set_dump_vmaps</code></td></tr></table></div></body></html> ref-lqr-progress-set-end-width-message.html 0000644 00000013357 15034750062 0014753 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_progress_set_end_width_message</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-progress.html" title="Progress reports"><link rel="prev" href="ref-lqr-progress-set-init-height-message.html" title="lqr_progress_set_init_height_message"><link rel="next" href="ref-lqr-progress-set-end-height-message.html" title="lqr_progress_set_end_height_message"></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_progress_set_end_width_message</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-progress-set-init-height-message.html">Prev</a>�</td><th width="60%" align="center">Progress reports</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-end-height-message.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-progress-set-end-width-message"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_progress_set_end_width_message — setup width message for end hooks in <code class="classname">LqrProgress</code> objects</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">LqrRetVal <b class="fsfunc">lqr_progress_set_end_width_message</b>(</code></td><td>LqrProgress* <var class="pdparam">p</var>, </td></tr><tr><td>�</td><td>const guchar* <var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm5575"></a><h2>Description</h2><p> The function <code class="function">lqr_progress_set_end_width_message</code> sets the string <em class="parameter"><code>message</code></em> in the <code class="classname">LqrProgress</code> object pointed to by <em class="parameter"><code>p</code></em> as the argument when rescaling the width for end hooks set with <a class="xref" href="ref-lqr-progress-set-end.html" title="lqr_progress_set_end"><span class="refentrytitle"><code class="function">lqr_progress_set_end</code></span>(3)</a> </p><p> The default value for newly created <code class="classname">LqrProgress</code> objects is: <code class="computeroutput">"done"</code>. </p></div><div class="refsect1"><a name="idm5586"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm5589"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-progress-new.html" title="lqr_progress_new"><span class="refentrytitle"><code class="function">lqr_progress_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init.html" title="lqr_progress_set_init"><span class="refentrytitle"><code class="function">lqr_progress_set_init</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update.html" title="lqr_progress_set_update"><span class="refentrytitle"><code class="function">lqr_progress_set_update</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end.html" title="lqr_progress_set_end"><span class="refentrytitle"><code class="function">lqr_progress_set_end</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init-width-message.html" title="lqr_progress_set_init_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_width_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init-height-message.html" title="lqr_progress_set_init_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_height_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end-height-message.html" title="lqr_progress_set_end_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_height_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update-step.html" title="lqr_progress_set_update_step"><span class="refentrytitle"><code class="function">lqr_progress_set_update_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</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-lqr-progress-set-init-height-message.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-progress.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-end-height-message.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_progress_set_init_height_message</code>�</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_progress_set_end_height_message</code></td></tr></table></div></body></html> ref-lqr-progress-set-init-width-message.html 0000644 00000013310 15034750062 0015135 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_progress_set_init_width_message</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-progress.html" title="Progress reports"><link rel="prev" href="ref-lqr-progress-set-update-step.html" title="lqr_progress_set_update_step"><link rel="next" href="ref-lqr-progress-set-init-height-message.html" title="lqr_progress_set_init_height_message"></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_progress_set_init_width_message</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-progress-set-update-step.html">Prev</a>�</td><th width="60%" align="center">Progress reports</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-init-height-message.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-progress-set-init-width-message"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_progress_set_init_width_message — setup width message for init hooks in <code class="classname">LqrProgress</code> objects</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">LqrRetVal <b class="fsfunc">lqr_progress_set_init_width_message</b>(</code></td><td>LqrProgress* <var class="pdparam">p</var>, </td></tr><tr><td>�</td><td>const guchar* <var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm5461"></a><h2>Description</h2><p> The function <code class="function">lqr_progress_set_init_width_message</code> sets the string <em class="parameter"><code>message</code></em> in the <code class="classname">LqrProgress</code> object pointed to by <em class="parameter"><code>p</code></em> as the argument when rescaling the width for init hooks set with <a class="xref" href="ref-lqr-progress-set-init.html" title="lqr_progress_set_init"><span class="refentrytitle"><code class="function">lqr_progress_set_init</code></span>(3)</a> </p><p> The default value for newly created <code class="classname">LqrProgress</code> objects is: <code class="computeroutput">"Resizing width..."</code> </p></div><div class="refsect1"><a name="idm5472"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm5475"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-progress-new.html" title="lqr_progress_new"><span class="refentrytitle"><code class="function">lqr_progress_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init.html" title="lqr_progress_set_init"><span class="refentrytitle"><code class="function">lqr_progress_set_init</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update.html" title="lqr_progress_set_update"><span class="refentrytitle"><code class="function">lqr_progress_set_update</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end.html" title="lqr_progress_set_end"><span class="refentrytitle"><code class="function">lqr_progress_set_end</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init-height-message.html" title="lqr_progress_set_init_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_height_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end-width-message.html" title="lqr_progress_set_end_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_width_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end-height-message.html" title="lqr_progress_set_end_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_height_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update-step.html" title="lqr_progress_set_update_step"><span class="refentrytitle"><code class="function">lqr_progress_set_update_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</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-lqr-progress-set-update-step.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-progress.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-init-height-message.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_progress_set_update_step</code>�</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_progress_set_init_height_message</code></td></tr></table></div></body></html> ref-lqr-carver-get-energy.html 0000644 00000023065 15034750062 0012336 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_get_energy</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-energy.html" title="Energy"><link rel="prev" href="ref-lqr-carver-set-energy-function.html" title="lqr_carver_set_energy_function"><link rel="next" href="ref-lqr-rwindow-read.html" title="lqr_rwindow_read"></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_get_energy</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-set-energy-function.html">Prev</a>�</td><th width="60%" align="center">Energy</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-rwindow-read.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-get-energy"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_get_energy, lqr_carver_get_true_energy, lqr_carver_get_energy_image — get the energy map for a <code class="classname">LqrCarver</code> object</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">LqrRetVal <b class="fsfunc">lqr_carver_get_energy</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gfloat * <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">orientation</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></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">LqrRetVal <b class="fsfunc">lqr_carver_get_true_energy</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gfloat * <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">orientation</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></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">LqrRetVal <b class="fsfunc">lqr_carver_get_energy</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>void * <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">orientation</var>, </td></tr><tr><td>�</td><td>LqrColDepth <var class="pdparam">col_depth</var>, </td></tr><tr><td>�</td><td>LqrImageType <var class="pdparam">image_type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4476"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_get_energy</code> writes the energy map of the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> to the given <em class="parameter"><code>buffer</code></em>, in a format suitable for plotting: all values are in the range between <code class="literal">0</code> and <code class="literal">1</code>, and the true values are mapped nonlinearly and stretched on this whole range, so that the differences between the middle values are enhanced with respect to very high or very low values. </p><p> The <em class="parameter"><code>orientation</code></em> parameter must be either <code class="literal">0</code> to get the energy map used for horizontal scalings, or <code class="literal">1</code> to get the map for vertical scalings. </p><p> The buffer must be allocated by the user before calling this function, and its size must be at least <code class="literal"><em class="parameter"><code>width</code></em> * <em class="parameter"><code>height</code></em></code>, where <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> are the current width and height of the <em class="parameter"><code>carver</code></em>. The energy values are ordered by row first, then by column. </p><p> The outcome will include the effect of the bias added to the <em class="parameter"><code>carver</code></em>, if any. </p><p> This function can be called over non-initialised <code class="classname">LqrCarver</code> objects, e.g. to provide previews on the effect of different energy functions, but it can also be invoked at any later time. Note, however, that in this latter case the <em class="parameter"><code>carver</code></em> could be flattened if necessary, therefore the function invocation is potentially destructive of the internal visibiliy map. </p><p> The function <code class="function">lqr_carvet_get_true_energy</code> is identical to the previous one, but the resulting buffer will contain the true energy, not scaled nor shifted. </p><p> The function <code class="function">lqr_carver_get_energy_image</code> is very similar to the function <code class="function">lqr_carveR_get_energy</code>, but it can be used to fill directly an image buffer of the format specified through the additional parameters <em class="parameter"><code>col_depth</code></em> and <em class="parameter"><code>image_type</code></em> (see <a class="xref" href="ref-lqr-col-depth.html" title="LqrColDepth"><span class="refentrytitle"><span class="type">LqrColDepth</span></span>(3)</a> and <a class="xref" href="ref-lqr-image-type.html" title="LqrImageType"><span class="refentrytitle"><span class="type">LqrImageType</span></span>(3)</a>). The <em class="parameter"><code>buffer</code></em> must be passed as <span class="type">void*</span>, but it must point to a memory area with sufficient allocated space for the chosen image type and colour depth. The image type cannot be <code class="literal">LQR_CUSTOM_IMAGE</code>. </p><p> For any choice of the parameters describing the image, the resulting <em class="parameter"><code>buffer</code></em> will hold a greyscale image, ranging from black (lowest energy) to white (highest energy). The opacity (alpha) will be set to <code class="literal">1</code>, if present. All the information will be stored in the black channel in <code class="literal">LQR_CMYK_IMAGE</code> and <code class="literal">LQR_CMYKA_IMAGE</code> image types. </p></div><div class="refsect1"><a name="idm4518"></a><h2>Return values</h2><p> The return values follow the Liquid Rescale library signalling system. The function <code class="function">lqr_carver_get_energy_image</code> will return an error if <em class="parameter"><code>image_type</code></em> is <code class="literal">LQR_CUSTOM_IMAGE</code>. </p></div><div class="refsect1"><a name="idm4524"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-set-energy-function-builtin.html" title="lqr_carver_set_energy_function_builtin"><span class="refentrytitle"><code class="function">lqr_carver_set_energy_function_builtin</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-energy-function.html" title="lqr_carver_set_energy_function"><span class="refentrytitle"><code class="function">lqr_carver_set_energy_function</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-bias-add.html" title="lqr_carver_bias_add"><span class="refentrytitle"><code class="function">lqr_carver_bias_add</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-lqr-carver-set-energy-function.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-energy.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-rwindow-read.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_set_energy_function</code>�</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_rwindow_read</code></td></tr></table></div></body></html> app-new-0-2.html 0000644 00000007116 15034750062 0007304 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>New symbols in version 0.2</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="app-new.html" title="Appendix�A.�API changes in new versions of the library"><link rel="prev" href="app-new-0-3.html" title="New symbols in version 0.3"><link rel="next" href="app-deprecated.html" title="Deprecated symbols"></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">New symbols in version 0.2</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="app-new-0-3.html">Prev</a>�</td><th width="60%" align="center">Appendix�A.�API changes in new versions of the library</th><td width="20%" align="right">�<a accesskey="n" href="app-deprecated.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="app-new-0-2"></a>New symbols in version 0.2</h2></div></div></div><p> </p><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="link" href="ref-lqr-col-depth.html" title="LqrColDepth"><span class="type">LqrColDepth</span></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-new.html" title="lqr_carver_new"><code class="function">lqr_carver_new_ext</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-scan.html" title="lqr_carver_scan"><code class="function">lqr_carver_scan_ext</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-scan-line.html" title="lqr_carver_scan_line"><code class="function">lqr_carver_scan_line_ext</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-get-channels.html" title="lqr_carver_get_channels"><code class="function">lqr_carver_get_channels</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-get-col-depth.html" title="lqr_carver_get_col_depth"><code class="function">lqr_carver_get_col_depth</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-set-side-switch-frequency.html" title="lqr_carver_set_side_switch_frequency"><code class="function">lqr_carver_set_side_switch_frequency</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-rigmask-add.html" title="lqr_carver_rigmask_add"><code class="function">lqr_carver_rigmask_add</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-rigmask-add.html" title="lqr_carver_rigmask_add"><code class="function">lqr_carver_rigmask_add_area</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-rigmask-add.html" title="lqr_carver_rigmask_add"><code class="function">lqr_carver_rigmask_add_rgb</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-rigmask-add.html" title="lqr_carver_rigmask_add"><code class="function">lqr_carver_rigmask_add_rgb_area</code></a></td></tr></table><p> </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="app-new-0-3.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="app-new.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="app-deprecated.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">New symbols in version 0.3�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Deprecated symbols</td></tr></table></div></body></html> generate-multi-size.html 0000644 00000040767 15034750062 0011344 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Generating the multi-size image</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="api-manual.html" title="Chapter�2.�LqR library API user manual"><link rel="prev" href="api-manual.html" title="Chapter�2.�LqR library API user manual"><link rel="next" href="lqr.html" title="Liquid rescaling"></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">Generating the multi-size image</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="api-manual.html">Prev</a>�</td><th width="60%" align="center">Chapter�2.�LqR library API user manual</th><td width="20%" align="right">�<a accesskey="n" href="lqr.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="generate-multi-size"></a>Generating the multi-size image</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="generate-multi-size.html#carver-new">Carver object creation</a></span></dt><dt><span class="sect2"><a href="generate-multi-size.html#carver-init">Carver activation</a></span></dt><dt><span class="sect2"><a href="generate-multi-size.html#image-type">Choosing the image type</a></span></dt></dl></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="carver-new"></a>Carver object creation</h3></div></div></div><p> The <code class="classname">LqrCarver</code> objects are initialised from a plain buffer representing an image. The default constructor assumes a colour depth of 8 bits per channel: </p><div class="funcsynopsis"><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></div><p> </p><p> Here, <em class="parameter"><code>buffer</code></em> is the array representing an image of size <em class="parameter"><code>width</code></em> by <em class="parameter"><code>height</code></em> with <em class="parameter"><code>channels</code></em> colour channels per pixels. Thus, the overall buffer size has to be of <code class="literal"><em class="parameter"><code>widht</code></em> * <em class="parameter"><code>height</code></em> * <em class="parameter"><code>channels</code></em> </code> unsigned characters, and ordered such that the <code class="literal"><span class="symbol">k</span></code>-th colour of the pixel at row <code class="literal"><span class="symbol">y</span></code> and column <code class="literal"><span class="symbol">x</span></code> is found at: </p><pre class="programlisting">buffer[(y * width + x) * channels + k]</pre><p> (this assumes that <code class="literal"><span class="symbol">x</span></code>, <code class="literal"><span class="symbol">y</span></code> and <code class="literal"><span class="symbol">k</span></code> all start from <code class="literal">0</code> and reach the maximum values <code class="literal"><span class="symbol">widht</span>-1</code>, <code class="literal"><span class="symbol">height</span>-1</code> and <code class="literal"><span class="symbol">channels</span>-1</code>, respectively) </p><p> The function returns a pointer to the newly allocated <code class="classname">LqrCarver</code> upon success, or <code class="literal"><span class="returnvalue">NULL</span></code> in case of insufficient memory. </p><p> In order to create <code class="classname">LqrCarver</code> objects with more than 8 bits per channel, an extended version of the constructor must be used: </p><div class="funcsynopsis"><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><p> The differnece with the default version is that the input buffer must be passed as void, and its type must be specified through the additional parameter <em class="parameter"><code>colour_depth</code></em>, which can take one of the following values: </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">LQR_COLDEPTH_8I</code></span></dt><dd><p> 8 bit unsigned integers (<span class="type">guchar</span>) </p></dd><dt><span class="term"><code class="literal">LQR_COLDEPTH_16I</code></span></dt><dd><p> 16 bit unsigned integers (<span class="type">guint16</span>) </p></dd><dt><span class="term"><code class="literal">LQR_COLDEPTH_32F</code></span></dt><dd><p> 32 bit floating point (<span class="type">gfloat</span>) </p></dd><dt><span class="term"><code class="literal">LQR_COLDEPTH_64F</code></span></dt><dd><p> 64 bit floating point (<span class="type">gdouble</span>) </p></dd></dl></div><p> </p><p> Floating point type values must range between <code class="literal">0</code> and <code class="literal">1</code>. </p><p> The library has some support for different image types and color models. When a <code class="classname">LqrCarver</code> object is created, the image type is automatically set from the number of channels (basically, assuming that the image is either grayscale or RGB with possibly an alpha channel), but it is important to set it manually using the function <code class="function">lqr_carver_set_image_type</code> if your program has to deal with different color models. See the section <a class="link" href="generate-multi-size.html#image-type" title="Choosing the image type">Choosing the image type</a> for more details. </p><p> By default, the buffer is assumed to be a copy of the original image, and therefore it is owned by the <code class="classname">LqrCarver</code> object and must not be accessed directly any more (and of course it must not be freed, the <code class="classname">LqrCarver</code> <a class="link" href="release.html" title="Releasing the memory">destructor</a> does it). If, instead, you want the Liquid Rescale library to keep the buffer intact, you must flag the <code class="classname">LqrCarver</code> after creation (or after <a class="link" href="generate-multi-size.html#carver-init" title="Carver activation">activation</a>), using this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">lqr_carver_set_preserve_input_image</b>(</code></td><td> LqrCarver * <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> This function must be used before any other operation takes place. </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="carver-init"></a>Carver activation</h3></div></div></div><p> The newly created <code class="classname">LqrCarver</code> consists only of the image buffer plus an uninitialised visibility map. If one had a previously computed visibility map, it could be imported into the <code class="classname">LqrCarver</code> and that would be enough (see the <a class="link" href="vmaps.html#import-vmap" title="Importing a visibility map in a carver">Importing a visibility map in a carver</a> section). </p><p> If the visibility map has to be computed, the <code class="classname">LqrCarver</code> needs to be initialised through this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_init</b>(</code></td><td> LqrCarver * <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td> gint <var class="pdparam">delta_x</var>, </td></tr><tr><td>�</td><td> gfloat <var class="pdparam">rigidity</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> Here, <em class="parameter"><code>delta_x</code></em> is the maximum allowed transversal step of the seams (0 means straight seams, the typical value is 1), while the <em class="parameter"><code>rigidity</code></em> parameter can be used to introduce a global bias for non-straight seams (the typical value is 0; a nonzero value can be modulated locally for specific areas using the functions described in section <a class="link" href="rigmask.html" title="Adding a rigidity mask">Adding a rigidity mask</a>). </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p> It is currently an error to initalise a carver object if a visibility map has been imported already. </p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="image-type"></a>Choosing the image type</h3></div></div></div><p> The library supports a small number of different image types/color models in order to correctly compute quantities such as the brightness of a pixel, which are important for automatic feature detection. </p><p> The image type can be set manually using the function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_set_image_type</b>(</code></td><td> LqrCarver * <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td> LqrImageType <var class="pdparam">image_type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> The type <span class="type">LqrImageType</span> is an <code class="literal">enum</code> which can take these values: </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><code class="literal">LQR_GREY_IMAGE</code></li><li class="listitem"><code class="literal">LQR_GREYA_IMAGE</code></li><li class="listitem"><code class="literal">LQR_RGB_IMAGE</code></li><li class="listitem"><code class="literal">LQR_RGBA_IMAGE</code></li><li class="listitem"><code class="literal">LQR_CMY_IMAGE</code></li><li class="listitem"><code class="literal">LQR_CMYK_IMAGE</code></li><li class="listitem"><code class="literal">LQR_CMYKA_IMAGE</code></li><li class="listitem"><code class="literal">LQR_CUSTOM_IMAGE</code></li></ul></div><p> </p><p> When creating a <code class="classname">LqrCarver</code> object, the image type is inferred from the number of channels according to this table: </p><div class="table"><a name="def-image-types"></a><p class="title"><b>Table�2.1.�Image types assigned by default</b></p><div class="table-contents"><table class="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><p> When setting a carver to <code class="literal">LQR_CUSTOM_IMAGE</code>, it is assumed that there are no alpha or black channels, but if there are, their index can be specified with the functions: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_set_alpha_channel</b>(</code></td><td> LqrCarver * <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td> gint <var class="pdparam">channel_index</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_set_black_channel</b>(</code></td><td> LqrCarver * <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td> gint <var class="pdparam">channel_index</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> Use the value <code class="literal">-1</code> in the indices arguments to unset those channels. Note that using <code class="literal">LQR_CUSTOM_IMAGE</code> in a carver normally requires special care in the choice and definitions of the energy functions (see the <a class="link" href="energy.html" title="Automatic feature detection">Automatic feature detection</a> section). </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> Setting manually the alpha or black channel with the above functions automatically sets the carver image type to <code class="literal">LQR_CUSTOM_IMAGE</code>. </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> The support for CMY (and derived) color models is very na�ve, since no color profiles are yet managed by the library. </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="api-manual.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="api-manual.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="lqr.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter�2.�LqR library API user manual�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Liquid rescaling</td></tr></table></div></body></html> ref-lqr-carver-get-ref-height.html 0000644 00000012177 15034750062 0013071 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_get_ref_height</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-get-ref-width.html" title="lqr_carver_get_ref_width"><link rel="next" href="ref-lqr-carver-get-channels.html" title="lqr_carver_get_channels"></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_get_ref_height</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-get-ref-width.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-get-channels.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-get-ref-height"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_get_ref_height — get the reference height of a <code class="classname">LqrCarver</code> object</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">gint <b class="fsfunc">lqr_carver_get_ref_height</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2654"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_get_ref_height</code> returns the internal reference height of the image contained in the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>, in pixel units. </p><p> The reference height is set as the original height at carver initialization, and reset any time the carver gets subsequently flattened, either explicitly through <a class="xref" href="ref-lqr-carver-flatten.html" title="lqr_carver_flatten"><span class="refentrytitle"><code class="function">lqr_carver_flatten</code></span>(3)</a> or implicitly when the rescale direction changes or an enlargment beyond the maximum enlargement step is performed. </p></div><div class="refsect1"><a name="idm2662"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-get-width.html" title="lqr_carver_get_width"><span class="refentrytitle"><code class="function">lqr_carver_get_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-height.html" title="lqr_carver_get_height"><span class="refentrytitle"><code class="function">lqr_carver_get_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-width.html" title="lqr_carver_get_ref_width"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-channels.html" title="lqr_carver_get_channels"><span class="refentrytitle"><code class="function">lqr_carver_get_channels</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-col-depth.html" title="lqr_carver_get_col_depth"><span class="refentrytitle"><code class="function">lqr_carver_get_col_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_get_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-flatten.html" title="lqr_carver_flatten"><span class="refentrytitle"><code class="function">lqr_carver_flatten</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_set_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-orientation.html" title="lqr_carver_get_orientation"><span class="refentrytitle"><code class="function">lqr_carver_get_orientation</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-lqr-carver-get-ref-width.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-get-channels.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_get_ref_width</code>�</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_get_channels</code></td></tr></table></div></body></html> ref-lqr-progress-set-init-height-message.html 0000644 00000013347 15034750062 0015300 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_progress_set_init_height_message</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-progress.html" title="Progress reports"><link rel="prev" href="ref-lqr-progress-set-init-width-message.html" title="lqr_progress_set_init_width_message"><link rel="next" href="ref-lqr-progress-set-end-width-message.html" title="lqr_progress_set_end_width_message"></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_progress_set_init_height_message</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-progress-set-init-width-message.html">Prev</a>�</td><th width="60%" align="center">Progress reports</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-end-width-message.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-progress-set-init-height-message"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_progress_set_init_height_message — setup height message for init hooks in <code class="classname">LqrProgress</code> objects</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">LqrRetVal <b class="fsfunc">lqr_progress_set_init_height_message</b>(</code></td><td>LqrProgress* <var class="pdparam">p</var>, </td></tr><tr><td>�</td><td>const guchar* <var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm5518"></a><h2>Description</h2><p> The function <code class="function">lqr_progress_set_init_height_message</code> sets the string <em class="parameter"><code>message</code></em> in the <code class="classname">LqrProgress</code> object pointed to by <em class="parameter"><code>p</code></em> as the argument when rescaling the height for init hooks set with <a class="xref" href="ref-lqr-progress-set-init.html" title="lqr_progress_set_init"><span class="refentrytitle"><code class="function">lqr_progress_set_init</code></span>(3)</a> </p><p> The default value for newly created <code class="classname">LqrProgress</code> objects is: <code class="computeroutput">"Resizing height..."</code> </p></div><div class="refsect1"><a name="idm5529"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm5532"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-progress-new.html" title="lqr_progress_new"><span class="refentrytitle"><code class="function">lqr_progress_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init.html" title="lqr_progress_set_init"><span class="refentrytitle"><code class="function">lqr_progress_set_init</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update.html" title="lqr_progress_set_update"><span class="refentrytitle"><code class="function">lqr_progress_set_update</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end.html" title="lqr_progress_set_end"><span class="refentrytitle"><code class="function">lqr_progress_set_end</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init-width-message.html" title="lqr_progress_set_init_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_width_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end-width-message.html" title="lqr_progress_set_end_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_width_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end-height-message.html" title="lqr_progress_set_end_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_height_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update-step.html" title="lqr_progress_set_update_step"><span class="refentrytitle"><code class="function">lqr_progress_set_update_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</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-lqr-progress-set-init-width-message.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-progress.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-end-width-message.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_progress_set_init_width_message</code>�</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_progress_set_end_width_message</code></td></tr></table></div></body></html> ref-lqr-carver-set-gradient-function.html 0000644 00000011617 15034750062 0014501 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_set_gradient_function</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-energy.html" title="Energy"><link rel="prev" href="ref-lqr-rwindow-get-channels.html" title="lqr_rwindow_get_channels"><link rel="next" href="ref-bias.html" title="Bias"></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_set_gradient_function</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-rwindow-get-channels.html">Prev</a>�</td><th width="60%" align="center">Energy</th><td width="20%" align="right">�<a accesskey="n" href="ref-bias.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-set-gradient-function"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_set_gradient_function — set the gradient function for an <code class="classname">LqrCarver</code> object</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">void <b class="fsfunc">lqr_carver_set_gradient_function</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>LqrGradFuncType <var class="pdparam">gf_ind</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4729"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_set_gradient_function</code> is deprecated and should not be used in newly written code. The function <a class="xref" href="ref-lqr-carver-set-energy-function-builtin.html" title="lqr_carver_set_energy_function_builtin"><span class="refentrytitle"><code class="function">lqr_carver_set_energy_function_builtin</code></span>(3)</a> should be used instead. </p><p> The function <code class="function">lqr_carver_set_gradient_function</code> is still maintained for backwards compatibility reasons; its result is equivalent to calling <code class="function">lqr_carver_set_energy_function_builtin</code>, with the following mapping between the argument <em class="parameter"><code>gs_ind</code></em> of the former and the argument <em class="parameter"><code>ef_ind</code></em> of the latter: </p><div class="informaltable"><a name="ref-gs-ef-mapping"></a><table class="informaltable" border="1"><colgroup><col><col></colgroup><thead><tr><th><span class="type"><code class="literal">LqrGradFuncType</code></span></th><th><span class="type"><code class="literal">LqrEnergyFuncBuiltinType</code></span></th></tr></thead><tbody><tr><td><code class="literal">LQR_GF_XABS</code></td><td><code class="literal">LQR_EF_GRAD_XABS</code></td></tr><tr><td><code class="literal">LQR_GF_SUMABS</code></td><td><code class="literal">LQR_EF_GRAD_SUMABS</code></td></tr><tr><td><code class="literal">LQR_GF_NORM</code></td><td><code class="literal">LQR_EF_GRAD_NORM</code></td></tr><tr><td><code class="literal">LQR_GF_NULL</code></td><td><code class="literal">LQR_EF_NULL</code></td></tr></tbody></table></div><p> </p></div><div class="refsect1"><a name="idm4770"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-set-energy-function-builtin.html" title="lqr_carver_set_energy_function_builtin"><span class="refentrytitle"><code class="function">lqr_carver_set_energy_function_builtin</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-energy-function.html" title="lqr_carver_set_energy_function"><span class="refentrytitle"><code class="function">lqr_carver_set_energy_function</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-lqr-rwindow-get-channels.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-energy.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-bias.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_rwindow_get_channels</code>�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Bias</td></tr></table></div></body></html> ref-lqr-carver-list-next.html 0000644 00000007246 15034750062 0012222 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_list_next</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-list-current.html" title="lqr_carver_list_current"><link rel="next" href="ref-lqr-carver-list-foreach.html" title="lqr_carver_list_foreach"></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_list_next</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-list-current.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-list-foreach.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-list-next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_list_next — advance the <code class="classname">LqrCarverList</code> object</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">LqrCarverList* <b class="fsfunc">lqr_carver_list_next</b>(</code></td><td>LqrCarverList* <var class="pdparam">list</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3491"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_list_next</code> returns a pointer to the next attached <code class="classname">LqrCarver</code> object in <em class="parameter"><code>list</code></em>, or <code class="literal"><span class="returnvalue">NULL</span></code> if the list has reached the end. </p></div><div class="refsect1"><a name="idm3499"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-attach.html" title="lqr_carver_attach"><span class="refentrytitle"><code class="function">lqr_carver_attach</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-start.html" title="lqr_carver_list_start"><span class="refentrytitle"><code class="function">lqr_carver_list_start</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-current.html" title="lqr_carver_list_current"><span class="refentrytitle"><code class="function">lqr_carver_list_current</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-foreach.html" title="lqr_carver_list_foreach"><span class="refentrytitle"><code class="function">lqr_carver_list_foreach</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-lqr-carver-list-current.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-list-foreach.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_list_current</code>�</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_list_foreach</code></td></tr></table></div></body></html> ref-lqr-carver-cancel.html 0000644 00000011631 15034750062 0011511 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_cancel</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-flatten.html" title="lqr_carver_flatten"><link rel="next" href="ref-lqr-carver-scan-reset.html" title="lqr_carver_scan_reset"></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_cancel</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-flatten.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-scan-reset.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-cancel"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_cancel — cancel ongoing operations on a <code class="classname">LqrCarver</code> object</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">LqrRetVal <b class="fsfunc">lqr_carver_cancel</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2255"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_cancel</code> can be used to cancel an ongoing operation which is currently being performed on the the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>. It must be used asynchronouly, from within an independent thread. </p><p> If an operation is in fact cancelled by this function, the function which was performing the operation will return the value <code class="literal"><span class="errorcode">LQR_USRCANCEL</span></code>, and so will do any other operation successively called on the same <code class="classname">LqrCarver</code> object whose return type is <code class="classname">LqrRetVal</code>; otherwise it will have no effect. </p><p> Whenever a function returns <code class="literal"><span class="errorcode">LQR_USRCANCEL</span></code>, it means that the <code class="classname">LqrCarver</code> object is in an inconsistent state, and, since there is currently no way to recover from this situation, any further operation on that object must be avoided, and it must be destroyed. </p><p> This function will fail if invoked over attached <code class="classname">LqrCarver</code> objects. </p></div><div class="refsect1"><a name="idm2272"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. However, it can be called multiple times, so it will never return <code class="literal"><span class="errorcode">LQR_USRCANCEL</span></code> itself. </p></div><div class="refsect1"><a name="idm2277"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-flatten.html" title="lqr_carver_flatten"><span class="refentrytitle"><code class="function">lqr_carver_flatten</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-lqr-carver-flatten.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-scan-reset.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_flatten</code>�</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_scan_reset</code></td></tr></table></div></body></html> ref-lqr-vmap-destroy.html 0000644 00000006250 15034750062 0011437 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_vmap_destroy</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-vmaps.html" title="Visibiliy maps"><link rel="prev" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"><link rel="next" href="ref-lqr-vmap-get-data.html" title="lqr_vmap_get_data"></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_vmap_destroy</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-vmap-new.html">Prev</a>�</td><th width="60%" align="center">Visibiliy maps</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-vmap-get-data.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-vmap-destroy"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_vmap_destroy — the <code class="classname">LqrVMap</code> object destructor</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">void <b class="fsfunc">lqr_vmap_destroy</b>(</code></td><td>LqrVMap* <var class="pdparam">vmap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3686"></a><h2>Description</h2><p> The function <code class="function">lqr_vmap_destroy</code> destroys the <code class="classname">LqrVMap</code> object. It is not necessary to invoke it over visibility maps which were loaded in <code class="classname">LqrCarver</code> objects, as this is done already by the carver object destructor. </p></div><div class="refsect1"><a name="idm3692"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"><span class="refentrytitle"><code class="function">lqr_vmap_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-load.html" title="lqr_vmap_load"><span class="refentrytitle"><code class="function">lqr_vmap_load</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-lqr-vmap-new.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-vmaps.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-vmap-get-data.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_vmap_new</code>�</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_vmap_get_data</code></td></tr></table></div></body></html> ref-lqr-carver-set-energy-function-builtin.html 0000644 00000012763 15034750062 0015644 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_set_energy_function_builtin</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-energy.html" title="Energy"><link rel="prev" href="ref-energy.html" title="Energy"><link rel="next" href="ref-lqr-carver-set-energy-function.html" title="lqr_carver_set_energy_function"></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_set_energy_function_builtin</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-energy.html">Prev</a>�</td><th width="60%" align="center">Energy</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-energy-function.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-set-energy-function-builtin"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_bias_set_energy_function_builtin — set a builtin energy function for a <code class="classname">LqrCarver</code> object</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">LqrRetVal <b class="fsfunc">lqr_carver_set_energy_function_builtin</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>LqrEnergyFuncBuiltinType <var class="pdparam">ef_ind</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4242"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_set_energy_function_builtin</code> allows to pick a builtin energy function for the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>. </p><p> The possible values for <em class="parameter"><code>ef_ind</code></em> are: </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">LQR_EF_GRAD_XABS</code></span></dt><dd><p> absolute value of the brightness gradient in the direction of the rescaling (this is the default) </p></dd><dt><span class="term"><code class="literal">LQR_EF_GRAD_SUMABS</code></span></dt><dd><p> sum of absolute values of the brightness gradients in both directions </p></dd><dt><span class="term"><code class="literal">LQR_EF_GRAD_NORM</code></span></dt><dd><p> norm of the brightness gradient </p></dd><dt><span class="term"><code class="literal">LQR_EF_LUMA_GRAD_XABS</code></span></dt><dd><p> absolute value of the luma gradient in the direction of the rescaling </p></dd><dt><span class="term"><code class="literal">LQR_EF_LUMA_GRAD_SUMABS</code></span></dt><dd><p> sum of absolute values of the luma gradients in both directions </p></dd><dt><span class="term"><code class="literal">LQR_EF_LUMA_GRAD_NORM</code></span></dt><dd><p> norm of the luma gradient </p></dd><dt><span class="term"><code class="literal">LQR_EF_NULL</code></span></dt><dd><p> null </p></dd></dl></div><p> </p><p> All of the above gradient functions have a radius of 1 pixel. </p></div><div class="refsect1"><a name="idm4287"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm4290"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-set-energy-function.html" title="lqr_carver_set_energy_function"><span class="refentrytitle"><code class="function">lqr_carver_set_energy_function</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-energy.html" title="lqr_carver_get_energy"><span class="refentrytitle"><code class="function">lqr_carver_get_energy</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-energy.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-energy.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-energy-function.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Energy�</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_set_energy_function</code></td></tr></table></div></body></html> ref-lqr-progress-set-end.html 0000644 00000015176 15034750062 0012215 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_progress_set_end</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-progress.html" title="Progress reports"><link rel="prev" href="ref-lqr-progress-set-update.html" title="lqr_progress_set_update"><link rel="next" href="ref-lqr-progress-set-update-step.html" title="lqr_progress_set_update_step"></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_progress_set_end</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-progress-set-update.html">Prev</a>�</td><th width="60%" align="center">Progress reports</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-update-step.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-progress-set-end"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_progress_set_end — execude custom code after each rescaling operation</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">LqrRetVal <b class="fsfunc">lqr_progress_set_end</b>(</code></td><td>LqrProgress* <var class="pdparam">p</var>, </td></tr><tr><td>�</td><td>LqrProgressFuncEnd <var class="pdparam">end_func</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm5352"></a><h2>Description</h2><p> The function <code class="function">lqr_progress_set_end</code> sets the hook <em class="parameter"><code>end_func</code></em> to the <code class="classname">LqrProgress</code> object pointed to by <em class="parameter"><code>p</code></em>. </p><p> The function <em class="parameter"><code>end_func</code></em> is of type <code class="classname">LqrProgressFuncEnd</code>, whose prototype is defined by: </p><pre class="programlisting"> typedef LqrRetVal (*LqrProgressFuncEnd) (const gchar* end_message); </pre><p> Each time that the function <a class="xref" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a> performs a rescale operation (recall that it can perform more than one rescale operation at each call) this function will be called at the end, with a string argument passed through the parameter <em class="parameter"><code>end_message</code></em>, which is different for horizontal and vertical rescalings. </p><p> The message arguments can be set with the functions <a class="xref" href="ref-lqr-progress-set-end-width-message.html" title="lqr_progress_set_end_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_width_message</code></span>(3)</a> and <a class="xref" href="ref-lqr-progress-set-end-height-message.html" title="lqr_progress_set_end_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_height_message</code></span>(3)</a>. </p></div><div class="refsect1"><a name="idm5368"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm5371"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-progress-new.html" title="lqr_progress_new"><span class="refentrytitle"><code class="function">lqr_progress_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init.html" title="lqr_progress_set_init"><span class="refentrytitle"><code class="function">lqr_progress_set_init</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update.html" title="lqr_progress_set_update"><span class="refentrytitle"><code class="function">lqr_progress_set_update</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init-width-message.html" title="lqr_progress_set_init_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_width_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init-height-message.html" title="lqr_progress_set_init_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_height_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end-width-message.html" title="lqr_progress_set_end_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_width_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end-height-message.html" title="lqr_progress_set_end_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_height_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update-step.html" title="lqr_progress_set_update_step"><span class="refentrytitle"><code class="function">lqr_progress_set_update_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</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-lqr-progress-set-update.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-progress.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-update-step.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_progress_set_update</code>�</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_progress_set_update_step</code></td></tr></table></div></body></html> ref-lqr-vmap-list-start.html 0000644 00000012364 15034750062 0012057 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_vmap_list_start</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-vmaps.html" title="Visibiliy maps"><link rel="prev" href="ref-lqr-vmap-load.html" title="lqr_vmap_load"><link rel="next" href="ref-lqr-vmap-list-current.html" title="lqr_vmap_list_current"></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_vmap_list_start</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-vmap-load.html">Prev</a>�</td><th width="60%" align="center">Visibiliy maps</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-vmap-list-current.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-vmap-list-start"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_vmap_list_start — get the <code class="classname">LqrVMapList</code> list attached to an <code class="classname">LqrCarver</code></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">LqrVMapList* <b class="fsfunc">lqr_vmap_list_start</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4050"></a><h2>Description</h2><p> The function <code class="function">lqr_vmap_list_start</code> returns the stating point of the <code class="classname">LqrVMapList</code> object associated with the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>, which is used to keep track of the <code class="classname">LqrVMap</code> objects internally dumped by it. </p><p> The returned value is <code class="literal"><span class="returnvalue">NULL</span></code> if there are no dumped visibility maps. </p><p> The function <code class="function">lqr_vmap_list_current</code> returns the <code class="classname">LqrVMap</code> object corresponding to the current value of the <em class="parameter"><code>list</code></em> parameter, or <code class="literal"><span class="returnvalue">NULL</span></code> in case of errors. </p><p> Use the functions <a class="xref" href="ref-lqr-vmap-list-current.html" title="lqr_vmap_list_current"><span class="refentrytitle"><code class="function">lqr_vmap_list_current</code></span>(3)</a> and <a class="xref" href="ref-lqr-vmap-list-next.html" title="lqr_vmap_list_next"><span class="refentrytitle"><code class="function">lqr_vmap_list_next</code></span>(3)</a> to access the list element individually, or the function <a class="xref" href="ref-lqr-vmap-list-foreach.html" title="lqr_vmap_list_foreach"><span class="refentrytitle"><code class="function">lqr_vmap_list_foreach</code></span>(3)</a> to operate on whole lists. </p></div><div class="refsect1"><a name="idm4071"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-vmap-list-current.html" title="lqr_vmap_list_current"><span class="refentrytitle"><code class="function">lqr_vmap_list_current</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-list-next.html" title="lqr_vmap_list_next"><span class="refentrytitle"><code class="function">lqr_vmap_list_next</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-list-foreach.html" title="lqr_vmap_list_foreach"><span class="refentrytitle"><code class="function">lqr_vmap_list_foreach</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-internal-dump.html" title="lqr_vmap_internal_dump"><span class="refentrytitle"><code class="function">lqr_vmap_internal_dump</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><span class="refentrytitle"><code class="function">lqr_carver_set_dump_vmaps</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-lqr-vmap-load.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-vmaps.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-vmap-list-current.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_vmap_load</code>�</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_vmap_list_current</code></td></tr></table></div></body></html> ref-lqr-carver-get-depth.html 0000644 00000012112 15034750062 0012140 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_get_depth</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-get-orientation.html" title="lqr_carver_get_orientation"><link rel="next" href="ref-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"></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_get_depth</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-get-orientation.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-enl-step.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-get-depth"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_get_depth — get the depth of a <code class="classname">LqrCarver</code> object</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">gint <b class="fsfunc">lqr_carver_get_depth</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2937"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_get_depth</code> returns the current depth of the visibility map internal to the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>vmap</code></em>, i.e. the maximum amount of scaling which can be performed with respect to the internal reference sizes in the current orientation without updating the internal map. </p></div><div class="refsect1"><a name="idm2943"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-get-width.html" title="lqr_carver_get_width"><span class="refentrytitle"><code class="function">lqr_carver_get_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-height.html" title="lqr_carver_get_height"><span class="refentrytitle"><code class="function">lqr_carver_get_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-width.html" title="lqr_carver_get_ref_width"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-height.html" title="lqr_carver_get_ref_height"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-channels.html" title="lqr_carver_get_channels"><span class="refentrytitle"><code class="function">lqr_carver_get_channels</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-col-depth.html" title="lqr_carver_get_col_depth"><span class="refentrytitle"><code class="function">lqr_carver_get_col_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_set_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_get_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-orientation.html" title="lqr_carver_get_orientation"><span class="refentrytitle"><code class="function">lqr_carver_get_orientation</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-depth.html" title="lqr_vmap_get_depth"><span class="refentrytitle"><code class="function">lqr_vmap_get_depth</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-lqr-carver-get-orientation.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-set-enl-step.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_get_orientation</code>�</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_set_enl_step</code></td></tr></table></div></body></html> progress.html 0000644 00000022531 15034750062 0007303 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Progress indicators</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="api-manual.html" title="Chapter�2.�LqR library API user manual"><link rel="prev" href="attach-images.html" title="Attaching extra images"><link rel="next" href="release.html" title="Releasing the memory"></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">Progress indicators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="attach-images.html">Prev</a>�</td><th width="60%" align="center">Chapter�2.�LqR library API user manual</th><td width="20%" align="right">�<a accesskey="n" href="release.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="progress"></a>Progress indicators</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="progress.html#progress-init">Creating and attaching a progress report object</a></span></dt><dt><span class="sect2"><a href="progress.html#progress-set-up">Setting up progress hooks</a></span></dt><dt><span class="sect2"><a href="progress.html#progress-messages">Initial and ending progress messages</a></span></dt><dt><span class="sect2"><a href="progress.html#progress-upd-step">Progress update step</a></span></dt></dl></div><p> By default, the resizing is performed silently. However, it is possible to define progress report functions, to receive feedback while the resizing is in progress. This is done through the <code class="classname">LqrProgress</code> objects. </p><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="progress-init"></a>Creating and attaching a progress report object</h3></div></div></div><p> A <code class="classname">LqrProgress</code> object is created through the function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrProgress* <b class="fsfunc">lqr_progress_new</b>(</code></td><td><code>void)</code>;</td><td>�</td></tr></table><div class="funcprototype-spacer">�</div></div><p> and can be associated to an <code class="classname">LqrCarver</code> object through this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">lqr_carver_set_progress</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>LqrProgress* <var class="pdparam">p</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="progress-set-up"></a>Setting up progress hooks</h3></div></div></div><p> Newly created progress objects are inactive, and need to be set up. </p><p> First, hook functions have to be set, which specify the action to take as the rescaling process starts, progresses, and ends, by using the functions: </p><pre class="programlisting"> LqrRetVal <code class="function">lqr_progress_set_init</code> (<code class="classname">LqrProgress</code> * <em class="parameter"><code>p</code></em>, LqrProgressFuncInit <em class="parameter"><code>init_func</code></em>) LqrRetVal <code class="function">lqr_progress_set_update</code> (<code class="classname">LqrProgress</code> * <em class="parameter"><code>p</code></em>, LqrProgressFuncUpdate <em class="parameter"><code>update_func</code></em>) LqrRetVal <code class="function">lqr_progress_set_end</code> (<code class="classname">LqrProgress</code> * <em class="parameter"><code>p</code></em>, LqrProgressFuncEnd <em class="parameter"><code>end_func</code></em>) </pre><p> as in this sample piece of code: </p><div class="example"><a name="ex-set-progress"></a><p class="title"><b>Example�2.12.�Setting progress hooks</b></p><div class="example-contents"><pre class="programlisting"> LqrProgress *p; p = lqr_progress_new(); lqr_progress_set_init (p, my_init); lqr_progress_set_update (p, my_update); lqr_progress_set_end (p, my_end); </pre></div></div><p><br class="example-break"> </p><p> The above example requires that the hook functions <code class="function">my_init</code>, <code class="function">my_update</code> and <code class="function">my_end</code> are defined as in the following sample declarations: </p><div class="example"><a name="ex-hook-decl"></a><p class="title"><b>Example�2.13.�Progress hooks declaration</b></p><div class="example-contents"><pre class="programlisting"> LqrRetVal my_init (const gchar *init_message); LqrRetVal my_update (gdouble percentage); LqrRetVal my_end (const gchar *end_message); </pre></div></div><p><br class="example-break"> </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="progress-messages"></a>Initial and ending progress messages</h3></div></div></div><p> The init and end hooks will be called at the beginning and at the end of each rescaling operation by function <code class="function">lqr_carver_resize</code>. The messages that will be passed to these hooks will change, depending if the resizing is occurring in the horizontal or in the vertical direction. The defaults for newly created <code class="classname">LqrProgress</code> objects are: </p><div class="table"><a name="progress-mess-def"></a><p class="title"><b>Table�2.2.�Default progress messages</b></p><div class="table-contents"><table class="table" summary="Default progress messages" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>�</th><th>init</th><th>end</th></tr></thead><tbody><tr><td>horizontal</td><td><code class="computeroutput">"Resizing width..."</code></td><td><code class="computeroutput">"done"</code></td></tr><tr><td>vertical</td><td><code class="computeroutput">"Resizing height..."</code></td><td><code class="computeroutput">"done"</code></td></tr></tbody></table></div></div><p><br class="table-break"> These can be changed using these functions: </p><pre class="programlisting"> LqrRetVal <code class="function">lqr_progress_set_init_width_message</code> (<code class="classname">LqrProgress</code> *<em class="parameter"><code>p</code></em>, const gchar * <em class="parameter"><code>message</code></em>) LqrRetVal <code class="function">lqr_progress_set_init_height_message</code> (<code class="classname">LqrProgress</code> *<em class="parameter"><code>p</code></em>, const gchar * <em class="parameter"><code>message</code></em>) LqrRetVal <code class="function">lqr_progress_set_end_width_message</code> (<code class="classname">LqrProgress</code> *<em class="parameter"><code>p</code></em>, const gchar * <em class="parameter"><code>message</code></em>) LqrRetVal <code class="function">lqr_progress_set_end_height_message</code> (<code class="classname">LqrProgress</code> *<em class="parameter"><code>p</code></em>, const gchar * <em class="parameter"><code>message</code></em>) </pre><p> </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="progress-upd-step"></a>Progress update step</h3></div></div></div><p> The update hook will be called at regular intervals, and it will be passed the completion percentage as the argument. </p><p> The update step can be specified through: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_progress_set_update_step</b>(</code></td><td>LqrProgress* <var class="pdparam">p</var>, </td></tr><tr><td>�</td><td>gfloat <var class="pdparam">update_step</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> The default step is 0.02 (i.e. 2%). </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="attach-images.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="api-manual.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="release.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Attaching extra images�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Releasing the memory</td></tr></table></div></body></html> ref-lqr-image-type.html 0000644 00000010435 15034750062 0011046 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>LqrImageType</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-pages.html#ref-const" title="Types defined by the library"><link rel="prev" href="ref-lqr-col-depth.html" title="LqrColDepth"><link rel="next" href="ref-carve.html" title="Carver objects"></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"><span class="type">LqrImageType</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-col-depth.html">Prev</a>�</td><th width="60%" align="center">Types defined by the library</th><td width="20%" align="right">�<a accesskey="n" href="ref-carve.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-image-type"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>LqrImageType — carver objects image type (colour model) specification</p></div><div class="refsect1"><a name="idm1742"></a><h2>Description</h2><p> The <code class="classname">LqrCarver</code> objects use knowledge about the image type they're working on in order to compute correctly some quantities (e.g. the brightness) for the automatic feature detection. Image types are set automatically by the constructors, but they can also be specified manually using quantities of the type <span class="type">LqrImageType</span>, which is an <code class="literal">enum</code> which can take these values: </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><code class="literal">LQR_GREY_IMAGE</code></li><li class="listitem"><code class="literal">LQR_GREYA_IMAGE</code></li><li class="listitem"><code class="literal">LQR_RGB_IMAGE</code></li><li class="listitem"><code class="literal">LQR_RGBA_IMAGE</code></li><li class="listitem"><code class="literal">LQR_CMY_IMAGE</code></li><li class="listitem"><code class="literal">LQR_CMYK_IMAGE</code></li><li class="listitem"><code class="literal">LQR_CMYKA_IMAGE</code></li><li class="listitem"><code class="literal">LQR_CUSTOM_IMAGE</code></li></ul></div><p> </p><p> Use the function <a class="xref" href="ref-lqr-carver-set-image-type.html" title="lqr_carver_set_image_type"><span class="refentrytitle"><code class="function">lqr_carver_set_image_type</code></span>(3)</a> to set the image type of a carver, and the function <a class="xref" href="ref-lqr-carver-get-image-type.html" title="lqr_carver_get_image_type"><span class="refentrytitle"><code class="function">lqr_carver_get_image_type</code></span>(3)</a> to read it out. </p></div><div class="refsect1"><a name="idm1768"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-new.html" title="lqr_carver_new"><span class="refentrytitle"><code class="function">lqr_carver_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-image-type.html" title="lqr_carver_set_image_type"><span class="refentrytitle"><code class="function">lqr_carver_set_image_type</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-image-type.html" title="lqr_carver_get_image_type"><span class="refentrytitle"><code class="function">lqr_carver_get_image_type</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-lqr-col-depth.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-pages.html#ref-const">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-carve.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="type">LqrColDepth</span>�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Carver objects</td></tr></table></div></body></html> release.html 0000644 00000005501 15034750062 0007055 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Releasing the memory</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="api-manual.html" title="Chapter�2.�LqR library API user manual"><link rel="prev" href="progress.html" title="Progress indicators"><link rel="next" href="ref-pages.html" title="Chapter�3.�LqR library API reference"></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">Releasing the memory</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="progress.html">Prev</a>�</td><th width="60%" align="center">Chapter�2.�LqR library API user manual</th><td width="20%" align="right">�<a accesskey="n" href="ref-pages.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="release"></a>Releasing the memory</h2></div></div></div><p> <code class="classname">LqrCarver</code> objects can be destroyed using this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">lqr_carver_destroy</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> This function also destroys any attached object, thus it should never be called on attached carvers. </p><p> <code class="classname">LqrVMap</code> objects can be destroyed using this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">lqr_vmap_destroy</b>(</code></td><td>LqrVMap* <var class="pdparam">vmap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="progress.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="api-manual.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-pages.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Progress indicators�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Chapter�3.�LqR library API reference</td></tr></table></div></body></html> ref-energy.html 0000644 00000010056 15034750062 0007501 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Energy</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-pages.html" title="Chapter�3.�LqR library API reference"><link rel="prev" href="ref-lqr-vmap-list-foreach.html" title="lqr_vmap_list_foreach"><link rel="next" href="ref-lqr-carver-set-energy-function-builtin.html" title="lqr_carver_set_energy_function_builtin"></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">Energy</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-vmap-list-foreach.html">Prev</a>�</td><th width="60%" align="center">Chapter�3.�LqR library API reference</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-energy-function-builtin.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ref-energy"></a>Energy</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="ref-lqr-carver-set-energy-function-builtin.html"><code class="function">lqr_carver_set_energy_function_builtin</code></a></span><span class="refpurpose"> — set a builtin energy function for a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-set-energy-function.html"><code class="function">lqr_carver_set_energy_function</code></a></span><span class="refpurpose"> — set a custom energy function for a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-get-energy.html"><code class="function">lqr_carver_get_energy</code></a></span><span class="refpurpose"> — get the energy map for a <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-rwindow-read.html"><code class="function">lqr_rwindow_read</code></a></span><span class="refpurpose"> — read the content of a <code class="classname">LqrReadingWindow</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-rwindow-get-read-t.html"><code class="function">lqr_rwindow_get_read_t</code></a></span><span class="refpurpose"> — get the reader type of a <code class="classname">LqrReadingWindow</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-rwindow-get-radius.html"><code class="function">lqr_rwindow_get_radius</code></a></span><span class="refpurpose"> — get the size of the region accessible from a <code class="classname">LqrReadingWindow</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-rwindow-get-channels.html"><code class="function">lqr_rwindow_get_channels</code></a></span><span class="refpurpose"> — get the number of channels of a <code class="classname">LqrReadingWindow</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-set-gradient-function.html"><code class="function">lqr_carver_set_gradient_function</code></a></span><span class="refpurpose"> — set the gradient function for an <code class="classname">LqrCarver</code> object</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref-lqr-vmap-list-foreach.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-pages.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-energy-function-builtin.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_vmap_list_foreach</code>�</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_set_energy_function_builtin</code></td></tr></table></div></body></html> ref-bias.html 0000644 00000004516 15034750062 0007132 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Bias</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-pages.html" title="Chapter�3.�LqR library API reference"><link rel="prev" href="ref-lqr-carver-set-gradient-function.html" title="lqr_carver_set_gradient_function"><link rel="next" href="ref-lqr-carver-bias-add.html" title="lqr_carver_bias_add"></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">Bias</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-set-gradient-function.html">Prev</a>�</td><th width="60%" align="center">Chapter�3.�LqR library API reference</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-bias-add.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ref-bias"></a>Bias</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="ref-lqr-carver-bias-add.html"><code class="function">lqr_carver_bias_add</code></a></span><span class="refpurpose"> — update an <code class="classname">LqrCarver</code> bias</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-bias-clear.html"><code class="function">lqr_carver_bias_clear</code></a></span><span class="refpurpose"> — clear an <code class="classname">LqrCarver</code> bias</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref-lqr-carver-set-gradient-function.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-pages.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-carver-bias-add.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_set_gradient_function</code>�</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_bias_add</code></td></tr></table></div></body></html> ref-lqr-vmap-list-current.html 0000644 00000007570 15034750062 0012407 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_vmap_list_current</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-vmaps.html" title="Visibiliy maps"><link rel="prev" href="ref-lqr-vmap-list-start.html" title="lqr_vmap_list_start"><link rel="next" href="ref-lqr-vmap-list-next.html" title="lqr_vmap_list_next"></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_vmap_list_current</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-vmap-list-start.html">Prev</a>�</td><th width="60%" align="center">Visibiliy maps</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-vmap-list-next.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-vmap-list-current"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_vmap_list_current — get current <code class="classname">LqrVMap</code> object in a <code class="classname">LqrVMapList</code> object</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">LqrVMap <b class="fsfunc">lqr_vmap_list_current</b>(</code></td><td>LqrVMapList* <var class="pdparam">list</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4103"></a><h2>Description</h2><p> The function <code class="function">lqr_vmap_list_current</code> returns the <code class="classname">LqrVMap</code> object corresponding to the current value of the <em class="parameter"><code>list</code></em> parameter, or <code class="literal"><span class="returnvalue">NULL</span></code> in case of errors. </p></div><div class="refsect1"><a name="idm4111"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-vmap-list-start.html" title="lqr_vmap_list_start"><span class="refentrytitle"><code class="function">lqr_vmap_list_start</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-list-next.html" title="lqr_vmap_list_next"><span class="refentrytitle"><code class="function">lqr_vmap_list_next</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-list-foreach.html" title="lqr_vmap_list_foreach"><span class="refentrytitle"><code class="function">lqr_vmap_list_foreach</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-internal-dump.html" title="lqr_vmap_internal_dump"><span class="refentrytitle"><code class="function">lqr_vmap_internal_dump</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><span class="refentrytitle"><code class="function">lqr_carver_set_dump_vmaps</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-lqr-vmap-list-start.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-vmaps.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-vmap-list-next.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_vmap_list_start</code>�</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_vmap_list_next</code></td></tr></table></div></body></html> ref-lqr-progress-set-update-step.html 0000644 00000010404 15034750062 0013667 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_progress_set_update_step</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-progress.html" title="Progress reports"><link rel="prev" href="ref-lqr-progress-set-end.html" title="lqr_progress_set_end"><link rel="next" href="ref-lqr-progress-set-init-width-message.html" title="lqr_progress_set_init_width_message"></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_progress_set_update_step</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-progress-set-end.html">Prev</a>�</td><th width="60%" align="center">Progress reports</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-init-width-message.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-progress-set-update-step"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_progress_set_update_step — setup update step for <code class="classname">LqrProgress</code> objects</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">LqrRetVal <b class="fsfunc">lqr_progress_set_update_step</b>(</code></td><td>LqrProgress* <var class="pdparam">p</var>, </td></tr><tr><td>�</td><td>gfloat <var class="pdparam">update_step</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm5414"></a><h2>Description</h2><p> The function <code class="function">lqr_progress_set_update_step</code> sets the update step of the <code class="classname">LqrProgress</code> pointed to by <em class="parameter"><code>p</code></em> to the value <em class="parameter"><code>update_step</code></em>. </p><p> The update step must be between <code class="literal">0</code> and <code class="literal">1</code>. </p><p> The default value is <code class="literal">0.02</code> (i.e. <code class="literal">2%</code>). </p></div><div class="refsect1"><a name="idm5427"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm5430"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-progress-new.html" title="lqr_progress_new"><span class="refentrytitle"><code class="function">lqr_progress_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update.html" title="lqr_progress_set_update"><span class="refentrytitle"><code class="function">lqr_progress_set_update</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</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-lqr-progress-set-end.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-progress.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-init-width-message.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_progress_set_end</code>�</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_progress_set_init_width_message</code></td></tr></table></div></body></html> ref-lqr-carver-scan-line.html 0000644 00000014462 15034750062 0012142 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_scan_line</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-scan-by-row.html" title="lqr_carver_scan_by_row"><link rel="next" href="ref-lqr-carver-get-width.html" title="lqr_carver_get_width"></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_scan_line</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-scan-by-row.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-get-width.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-scan-line"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_scan_line, lqr_carver_scan_line_ext — read out a multi-size image one line at a time</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">gboolean <b class="fsfunc">lqr_carver_scan_line</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gint* <var class="pdparam">n</var>, </td></tr><tr><td>�</td><td>guchar** <var class="pdparam">rgb</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">gboolean <b class="fsfunc">lqr_carver_scan_line_ext</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gint* <var class="pdparam">n</var>, </td></tr><tr><td>�</td><td>void** <var class="pdparam">rgb</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2468"></a><h2>Description</h2><p> The functions <code class="function">lqr_carver_scan_line</code> and <code class="function">lqr_carver_scan_line_ext</code> are used to read out the multi-size image contained in the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> one line at a time. They store the line number (row or column) in the variable pointed to by <em class="parameter"><code>n</code></em> and the colour values in the array pointed to by <em class="parameter"><code>rgb</code></em>; then they move the readout pointer to the next line, or they reset it if the end of the image is reached. </p><p> The first one must only be used on the <code class="classname">LqrCarver</code> objects created with <em class="parameter"><code>lqr_carver_new</code></em>, i.e. with 8-bit images, while the second one is general, but the <em class="parameter"><code>rgb</code></em> pointer must be cast to the appropriate type to be used (i.e pass the address of a pointer to <code class="literal">void</code> to the function <code class="function">lqr_carver_scan_line_ext</code>, then cast it to a pointer of the appropriate type and use this last one for reading the output). </p><p> Use the function <a class="xref" href="ref-lqr-carver-scan-by-row.html" title="lqr_carver_scan_by_row"><span class="refentrytitle"><code class="function">lqr_carver_scan_by_row</code></span>(3)</a> before calling these to know whether your image will be scanned by row or by column. </p></div><div class="refsect1"><a name="idm2485"></a><h2>Return value</h2><p> These functions return <code class="literal"><span class="returnvalue">TRUE</span></code> in case the readout is successful and the end of the image was not reached, <code class="literal"><span class="returnvalue">FALSE</span></code> otherwise. If <code class="function">lqr_carver_scan_line</code> is called over a non-8-bit <code class="classname">LqrCarver</code> object, it will return <code class="literal"><span class="returnvalue">FALSE</span></code>. </p></div><div class="refsect1"><a name="idm2496"></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-carver-scan-reset.html" title="lqr_carver_scan_reset"><span class="refentrytitle"><code class="function">lqr_carver_scan_reset</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-scan.html" title="lqr_carver_scan"><span class="refentrytitle"><code class="function">lqr_carver_scan</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-scan-by-row.html" title="lqr_carver_scan_by_row"><span class="refentrytitle"><code class="function">lqr_carver_scan_by_row</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-lqr-carver-scan-by-row.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-get-width.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_scan_by_row</code>�</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_get_width</code></td></tr></table></div></body></html> ref-lqr-carver-bias-clear.html 0000644 00000005605 15034750062 0012272 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_bias_clear</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-bias.html" title="Bias"><link rel="prev" href="ref-lqr-carver-bias-add.html" title="lqr_carver_bias_add"><link rel="next" href="ref-rigmask.html" title="Rigidity masks"></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_bias_clear</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-bias-add.html">Prev</a>�</td><th width="60%" align="center">Bias</th><td width="20%" align="right">�<a accesskey="n" href="ref-rigmask.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-bias-clear"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_bias_clear — clear an <code class="classname">LqrCarver</code> bias</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">void <b class="fsfunc">lqr_carver_bias_clear</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4948"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_bias_clear</code> clears the bias from the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> </p></div><div class="refsect1"><a name="idm4954"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-bias-add.html" title="lqr_carver_bias_add"><span class="refentrytitle"><code class="function">lqr_carver_bias_add</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-lqr-carver-bias-add.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-bias.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-rigmask.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_bias_add</code>�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Rigidity masks</td></tr></table></div></body></html> ref-lqr-carver-get-ref-width.html 0000644 00000012164 15034750062 0012734 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_get_ref_width</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-get-height.html" title="lqr_carver_get_height"><link rel="next" href="ref-lqr-carver-get-ref-height.html" title="lqr_carver_get_ref_height"></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_get_ref_width</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-get-height.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-get-ref-height.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-get-ref-width"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_get_ref_width — get the reference width of a <code class="classname">LqrCarver</code> object</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">gint <b class="fsfunc">lqr_carver_get_ref_width</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2607"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_get_ref_width</code> returns the internal reference width of the image contained in the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>, in pixel units. </p><p> The reference width is set as the original height at carver initialization, and reset any time the carver gets subsequently flattened, either explicitly through <a class="xref" href="ref-lqr-carver-flatten.html" title="lqr_carver_flatten"><span class="refentrytitle"><code class="function">lqr_carver_flatten</code></span>(3)</a> or implicitly when the rescale direction changes or an enlargment beyond the maximum enlargement step is performed. </p></div><div class="refsect1"><a name="idm2615"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-get-width.html" title="lqr_carver_get_width"><span class="refentrytitle"><code class="function">lqr_carver_get_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-height.html" title="lqr_carver_get_height"><span class="refentrytitle"><code class="function">lqr_carver_get_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-height.html" title="lqr_carver_get_ref_height"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-channels.html" title="lqr_carver_get_channels"><span class="refentrytitle"><code class="function">lqr_carver_get_channels</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-col-depth.html" title="lqr_carver_get_col_depth"><span class="refentrytitle"><code class="function">lqr_carver_get_col_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_get_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-flatten.html" title="lqr_carver_flatten"><span class="refentrytitle"><code class="function">lqr_carver_flatten</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_set_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-orientation.html" title="lqr_carver_get_orientation"><span class="refentrytitle"><code class="function">lqr_carver_get_orientation</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-lqr-carver-get-height.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-get-ref-height.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_get_height</code>�</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_get_ref_height</code></td></tr></table></div></body></html> overview.html 0000644 00000010644 15034750062 0007307 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Overview of the library</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="Introduction.html" title="Chapter�1.�Introduction"><link rel="prev" href="seam-carve.html" title="Seam carving in brief"><link rel="next" href="basic.html" title="Basic methods"></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">Overview of the library</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="seam-carve.html">Prev</a>�</td><th width="60%" align="center">Chapter�1.�Introduction</th><td width="20%" align="right">�<a accesskey="n" href="basic.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="overview"></a>Overview of the library</h2></div></div></div><p> The Liquid Rescale library is written in C, but can be used into C++ programs without any modification. It has an object-oriented design, so that the terminology in this manual is borrowed from C++. The central class of the library is called <code class="classname">LqrCarver</code>. Carver objects can generate and store multi-size images, or load them, and read them out at the desired size. </p><p> Internally, multi-size images are stored simply as plain images with the addition of a visibility map. Each pixel in the image has its own visibility level. Whether to display a pixel or not simply depends on the comparison of each pixel's visibility with a given global visibility level. In this way, images of different sizes can be read out, simply by setting a global visibility level. </p><p> Therefore, once the visibility map has been computed, it allows effortless, real-time scaling. However, visibility maps also necessarily have an orientation, either horizontal or vertical. If we want to resize on the other direction, the visibility map has to be computed afresh, and the previous visibility map becomes useless, because the two maps are not consistent one with the other. </p><p> This also implies that the resizing order affects the final result: rescaling horizontally first, then vertically, does not yield the same result as following the reverse order. Moreover, one could choose an intermediate way, e.g. by rescaling by one pixel in one direction, one in the other, then iterating as needed to reach the final size. </p><p> The default behaviour of the library is to rescale horizontally first, then vertically, but this order can be reversed. </p><p> Visibility maps can be stored in objects of type <code class="classname">LqrVMap</code>. When an <code class="classname">LqrCarver</code> object is created from an input image, the visibility of each pixel is uninitialised. At this point, one could either import a previously computed <code class="classname">LqrVMap</code>, or activate the <code class="classname">LqrCarver</code> so that it creates one afresh when asked to. </p><p> In either case, there's a single method to call, specifiying the new desired size; all the rest will automatically be computed as necessary. By default, the visibility maps are only computed up to the extent to which they are needed for resizing. </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="seam-carve.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="Introduction.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="basic.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Seam carving in brief�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Basic methods</td></tr></table></div></body></html> ref-lqr-carver-set-progress.html 0000644 00000011552 15034750062 0012723 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_set_progress</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-set-side-switch-frequency.html" title="lqr_carver_set_side_switch_frequency"><link rel="next" href="ref-lqr-carver-set-preserve-input-image.html" title="lqr_carver_set_preserve_input_image"></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_set_progress</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-set-side-switch-frequency.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-preserve-input-image.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-set-progress"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_set_progress — set the progress report function for an <code class="classname">LqrCarver</code> object</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">void <b class="fsfunc">lqr_carver_set_progress</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>LqrProgress* <var class="pdparam">p</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3219"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_set_progress</code> associates the progress indicator pointed to by <em class="parameter"><code>progress</code></em> to the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>. Progress indicators objects are created with the function <a class="xref" href="ref-lqr-progress-new.html" title="lqr_progress_new"><span class="refentrytitle"><code class="function">lqr_progress_new</code></span>(3)</a>. </p><p> By default, no progress indicator is used. </p></div><div class="refsect1"><a name="idm3228"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-progress-new.html" title="lqr_progress_new"><span class="refentrytitle"><code class="function">lqr_progress_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_set_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-resize-order.html" title="lqr_carver_set_resize_order"><span class="refentrytitle"><code class="function">lqr_carver_set_resize_order</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><span class="refentrytitle"><code class="function">lqr_carver_set_dump_vmaps</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-side-switch-frequency.html" title="lqr_carver_set_side_switch_frequency"><span class="refentrytitle"><code class="function">lqr_carver_set_side_switch_frequency</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>, <a class="xref" href="ref-lqr-carver-set-use-cache.html" title="lqr_carver_set_use_cache"><span class="refentrytitle"><code class="function">lqr_carver_set_use_cache</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-lqr-carver-set-side-switch-frequency.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-set-preserve-input-image.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_set_side_switch_frequency</code>�</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_set_preserve_input_image</code></td></tr></table></div></body></html> ref-lqr-carver-list-current.html 0000644 00000007364 15034750062 0012727 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_list_current</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-list-start.html" title="lqr_carver_list_start"><link rel="next" href="ref-lqr-carver-list-next.html" title="lqr_carver_list_next"></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_list_current</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-list-start.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-list-next.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-list-current"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_list_current — get current <code class="classname">LqrCarver</code> object in a <code class="classname">LqrCarverList</code> object</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_list_current</b>(</code></td><td>LqrCarverList* <var class="pdparam">list</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3454"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_list_current</code> returns a pointer to the <code class="classname">LqrCarver</code> object corresponding to the current value of the <em class="parameter"><code>list</code></em> parameter, or <code class="literal"><span class="returnvalue">NULL</span></code> in case of errors. </p></div><div class="refsect1"><a name="idm3462"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-attach.html" title="lqr_carver_attach"><span class="refentrytitle"><code class="function">lqr_carver_attach</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-start.html" title="lqr_carver_list_start"><span class="refentrytitle"><code class="function">lqr_carver_list_start</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-next.html" title="lqr_carver_list_next"><span class="refentrytitle"><code class="function">lqr_carver_list_next</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-foreach.html" title="lqr_carver_list_foreach"><span class="refentrytitle"><code class="function">lqr_carver_list_foreach</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-lqr-carver-list-start.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-list-next.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_list_start</code>�</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_list_next</code></td></tr></table></div></body></html> ref-lqr-vmap-internal-dump.html 0000644 00000007532 15034750062 0012531 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_vmap_internal_dump</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-vmaps.html" title="Visibiliy maps"><link rel="prev" href="ref-lqr-vmap-dump.html" title="lqr_vmap_dump"><link rel="next" href="ref-lqr-vmap-load.html" title="lqr_vmap_load"></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_vmap_internal_dump</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-vmap-dump.html">Prev</a>�</td><th width="60%" align="center">Visibiliy maps</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-vmap-load.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-vmap-internal-dump"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_vmap_internal_dump — dump an <code class="classname">LqrVMap</code> objects into an <code class="classname">LqrCarver</code> object</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">LqrRetVal <b class="fsfunc">lqr_vmap_internal_dump</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3964"></a><h2>Description</h2><p> The function <code class="function">lqr_vmap_internal_dump</code> dumps the current visibility map of the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> internally to it, attaching it to the same <code class="classname">LqrVMapList</code> object list as the one used for automatic dumping (as activated by <a class="xref" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><span class="refentrytitle"><code class="function">lqr_carver_set_dump_vmaps</code></span>(3)</a>. </p></div><div class="refsect1"><a name="idm3972"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-dump.html" title="lqr_vmap_dump"><span class="refentrytitle"><code class="function">lqr_vmap_dump</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-load.html" title="lqr_vmap_load"><span class="refentrytitle"><code class="function">lqr_vmap_load</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><span class="refentrytitle"><code class="function">lqr_carver_set_dump_vmaps</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-lqr-vmap-dump.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-vmaps.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-vmap-load.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_vmap_dump</code>�</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_vmap_load</code></td></tr></table></div></body></html> ref-lqr-carver-set-black-channel.html 0000644 00000012772 15034750062 0013546 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_set_black_channel</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-set-alpha-channel.html" title="lqr_carver_set_alpha_channel"><link rel="next" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"></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_set_black_channel</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-set-alpha-channel.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-resize.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-set-black-channel"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_set_black_channel — sets the black channel index in a <code class="classname">LqrCarver</code> object</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">LqrRetVal <b class="fsfunc">lqr_carver_set_black_channel</b>(</code></td><td> LqrCarver * <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td> gint <var class="pdparam">channel_index</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2098"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_set_black_channel</code> sets the black channel index of the image stored in the <code class="classname">LqrCarver</code> pointed to by <em class="parameter"><code>carver</code></em> to <em class="parameter"><code>channel_index</code></em> (between <code class="literal">0</code> and <code class="literal">channels - 1</code>, where <code class="literal">channels</code> is the number of colour channels of the <em class="parameter"><code>carver</code></em>). </p><p> Use a negative value for <em class="parameter"><code>cahnnel_index</code></em> to specify that no black channel is present. </p><p> If the specified channel coincides with the current value of the alpha channel, the alpha channel is unset. </p><p> Calling this function sets the image time of the <em class="parameter"><code>carver</code></em> to <code class="literal">LQR_CUSTOM_IMAGE</code>. Furthermore, the image color model will be assumed to be subtractive by the function <a class="xref" href="ref-lqr-rwindow-read.html" title="lqr_rwindow_read"><span class="refentrytitle"><code class="function">lqr_rwindow_read</code></span>(3)</a> when it computes the brightness or the luma. </p></div><div class="refsect1"><a name="idm2116"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm2119"></a><h2>See also</h2><p> <span class="simplelist"><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-new.html" title="lqr_carver_new"><span class="refentrytitle"><code class="function">lqr_carver_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-image-type.html" title="lqr_carver_set_image_type"><span class="refentrytitle"><code class="function">lqr_carver_set_image_type</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-alpha-channel.html" title="lqr_carver_set_alpha_channel"><span class="refentrytitle"><code class="function">lqr_carver_set_alpha_channel</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-image-type.html" title="lqr_carver_get_image_type"><span class="refentrytitle"><code class="function">lqr_carver_get_image_type</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-channels.html" title="lqr_carver_get_channels"><span class="refentrytitle"><code class="function">lqr_carver_get_channels</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-lqr-carver-set-alpha-channel.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-resize.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_set_alpha_channel</code>�</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_resize</code></td></tr></table></div></body></html> ref-lqr-vmap-list-next.html 0000644 00000007464 15034750062 0011705 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_vmap_list_next</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-vmaps.html" title="Visibiliy maps"><link rel="prev" href="ref-lqr-vmap-list-current.html" title="lqr_vmap_list_current"><link rel="next" href="ref-lqr-vmap-list-foreach.html" title="lqr_vmap_list_foreach"></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_vmap_list_next</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-vmap-list-current.html">Prev</a>�</td><th width="60%" align="center">Visibiliy maps</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-vmap-list-foreach.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-vmap-list-next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_vmap_list_next — advance the <code class="classname">LqrVMapList</code> object</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">LqrVMapList <b class="fsfunc">lqr_vmap_list_next</b>(</code></td><td>LqrVMapList* <var class="pdparam">list</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4142"></a><h2>Description</h2><p> The function <code class="function">lqr_vmap_list_next</code> returns a pointer the next dumped <code class="classname">LqrVMap</code> object in <em class="parameter"><code>list</code></em>, or <code class="literal"><span class="returnvalue">NULL</span></code> if the list has reached the end. </p></div><div class="refsect1"><a name="idm4150"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-vmap-list-start.html" title="lqr_vmap_list_start"><span class="refentrytitle"><code class="function">lqr_vmap_list_start</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-list-current.html" title="lqr_vmap_list_current"><span class="refentrytitle"><code class="function">lqr_vmap_list_current</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-list-foreach.html" title="lqr_vmap_list_foreach"><span class="refentrytitle"><code class="function">lqr_vmap_list_foreach</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-internal-dump.html" title="lqr_vmap_internal_dump"><span class="refentrytitle"><code class="function">lqr_vmap_internal_dump</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><span class="refentrytitle"><code class="function">lqr_carver_set_dump_vmaps</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-lqr-vmap-list-current.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-vmaps.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-vmap-list-foreach.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_vmap_list_current</code>�</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_vmap_list_foreach</code></td></tr></table></div></body></html> ref-lqr-carver-rigmask-add.html 0000644 00000026356 15034750062 0012461 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_rigmask_add</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-rigmask.html" title="Rigidity masks"><link rel="prev" href="ref-rigmask.html" title="Rigidity masks"><link rel="next" href="ref-lqr-carver-rigmask-clear.html" title="lqr_carver_rigmask_clear"></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_rigmask_add</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-rigmask.html">Prev</a>�</td><th width="60%" align="center">Rigidity masks</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-rigmask-clear.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-rigmask-add"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_rigmask_add_xy, lqr_carver_rigmask_add_area, lqr_carver_rigmask_add, lqr_carver_rigmask_add_rgb_area, lqr_carver_rigmask_add_rgb — update an <code class="classname">LqrCarver</code> rigidity mask</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">LqrRetVal <b class="fsfunc">lqr_carver_rigmask_add_xy</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble <var class="pdparam">rigidity</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">x</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">y</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">LqrRetVal <b class="fsfunc">lqr_carver_rigmask_add_area</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble* <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">x_off</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">y_off</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">LqrRetVal <b class="fsfunc">lqr_carver_rigmask_add</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble* <var class="pdparam">buffer</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">LqrRetVal <b class="fsfunc">lqr_carver_rigmask_add_area</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble* <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">channels</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">x_off</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">y_off</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">LqrRetVal <b class="fsfunc">lqr_carver_rigmask_add_rgb</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble* <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">channels</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm5037"></a><h2>Foreword</h2><p> All the functions described in this page are used to add a rigidity mask to <code class="classname">LqrCarver</code> objects. Whenever one of these functions is called, a rigidity mask is activated for the whole image; the mask contains coefficients which modulate the value of the rigidity (which is set with <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>) in different areas of the image. </p><p> It is very important to note that using no rigidity masks at all is equivalent to use a rigidity mask over the whole image with all the values set to <code class="literal">1.0</code>, but, when first adding a rigidity mask to a <code class="classname">LqrCarver</code> object, all the pixels outside the affected area will have their rigidity set to zero; therefore, the functions <code class="function">lqr_carver_rigmask_add_xy</code>, <code class="function">lqr_carver_rigmask_add_area</code> and <code class="function">lqr_carver_rigmask_add_rgb_area</code> actually affect the whole image, despite their name. </p><p> All the functions must be called after <code class="function">lqr_carver_init</code> and before <code class="function">lqr_carver_resize</code>. If called multiple times over the same area, new values will replace the old ones. </p></div><div class="refsect1"><a name="idm5051"></a><h2>Setting the rigidity mask pixel by pixel</h2><p> The function <code class="function">lqr_carver_rigmask_add_xy</code> sets the rigidity mask value of the <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> pixel of the image loaded into the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> </p></div><div class="refsect1"><a name="idm5059"></a><h2>Setting the rigidity mask from a buffer</h2><p> The function <code class="function">lqr_carver_rigmask_add_area</code> adds a rigidity mask to an area of the image loaded in the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>. </p><p> The parameter <em class="parameter"><code>buffer</code></em> must point to an array of <span class="type">doubles</span> of size <code class="literal"><em class="parameter"><code>width</code></em> * <em class="parameter"><code>height</code></em></code>, ordered first by rows, then by columns. </p><p> The offset of the area relative to the image are specified through <em class="parameter"><code>x_off</code></em> and <em class="parameter"><code>y_off</code></em>. The rigidity mask area can exceed the boundary of the image, and the offsets can be negative. </p><p> The values in the given <em class="parameter"><code>buffer</code></em> are scaled by the overall <em class="parameter"><code>rigidity</code></em> value set when calling the function <code class="function">lqr_carver_init</code>. </p><p> The function <code class="function">lqr_carver_rigmask_add</code> can be used when the area to add is of the same size of the image loaded in the <code class="classname">LqrCarver</code> object and the offsets are <code class="literal">0</code>. </p></div><div class="refsect1"><a name="idm5082"></a><h2>Setting the rigidity mask from an image</h2><p> The functions <code class="function">lqr_carver_rigmask_add_rgb_area</code> and <code class="function">lqr_carver_rigmask_add_rgb</code> are very similar to <code class="function">lqr_carver_rigmask_add_area</code> and <code class="function">lqr_carver_rigmask_add</code>, but use 8-bit multi-channel images as inputs. </p><p> The number of channels in the image is passed via the parameter <em class="parameter"><code>channels</code></em>. The last channel is assumed to be the alpha (opacity) channel if <em class="parameter"><code>channels</code></em> is equal to <code class="literal">2</code> or greater than <code class="literal">3</code> (if this is not the case, use the previous functions). </p><p> The rigidity value is computed from the average of the colour channels, multiplied by the value of the alpha channel if present. For example, in RGBA images a white, nontransparent pixel is equivalent to a value of <code class="literal">1.0</code> when using a buffer in <code class="function">lqr_carver_rigmask_add_area</code>. </p></div><div class="refsect1"><a name="idm5097"></a><h2>Return value</h2><p> The return values follow the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm5100"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></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-bias-add.html" title="lqr_carver_bias_add"><span class="refentrytitle"><code class="function">lqr_carver_bias_add</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-rigmask.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-rigmask.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-carver-rigmask-clear.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Rigidity masks�</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_rigmask_clear</code></td></tr></table></div></body></html> ref-vmaps.html 0000644 00000012515 15034750062 0007340 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Visibiliy maps</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-pages.html" title="Chapter�3.�LqR library API reference"><link rel="prev" href="ref-lqr-carver-list-foreach.html" title="lqr_carver_list_foreach"><link rel="next" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"></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">Visibiliy maps</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-list-foreach.html">Prev</a>�</td><th width="60%" align="center">Chapter�3.�LqR library API reference</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-vmap-new.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ref-vmaps"></a>Visibiliy maps</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="ref-lqr-vmap-new.html"><code class="function">lqr_vmap_new</code></a></span><span class="refpurpose"> — the <code class="classname">LqrVMap</code> object constructor</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-vmap-destroy.html"><code class="function">lqr_vmap_destroy</code></a></span><span class="refpurpose"> — the <code class="classname">LqrVMap</code> object destructor</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-vmap-get-data.html"><code class="function">lqr_vmap_get_data</code></a></span><span class="refpurpose"> — get varous <code class="classname">LqrVMap</code> object quantities</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-vmap-get-depth.html"><code class="function">lqr_vmap_get_depth</code></a></span><span class="refpurpose"> — get the depth of an <code class="classname">LqrVMap</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-vmap-get-width.html"><code class="function">lqr_vmap_get_width</code></a></span><span class="refpurpose"> — get the width of an <code class="classname">LqrVMap</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-vmap-get-height.html"><code class="function">lqr_vmap_get_height</code></a></span><span class="refpurpose"> — get the height of an <code class="classname">LqrVMap</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-vmap-get-orientation.html"><code class="function">lqr_vmap_get_orientation</code></a></span><span class="refpurpose"> — get the orientation of an <code class="classname">LqrVMap</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-vmap-dump.html"><code class="function">lqr_vmap_dump</code></a></span><span class="refpurpose"> — dump an <code class="classname">LqrVMap</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-vmap-internal-dump.html"><code class="function">lqr_vmap_internal_dump</code></a></span><span class="refpurpose"> — dump an <code class="classname">LqrVMap</code> objects into an <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-vmap-load.html"><code class="function">lqr_vmap_load</code></a></span><span class="refpurpose"> — load an <code class="classname">LqrVMap</code> object into an <code class="classname">LqrCarver</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-vmap-list-start.html"><code class="function">lqr_vmap_list_start</code></a></span><span class="refpurpose"> — get the <code class="classname">LqrVMapList</code> list attached to an <code class="classname">LqrCarver</code></span></dt><dt><span class="refentrytitle"><a href="ref-lqr-vmap-list-current.html"><code class="function">lqr_vmap_list_current</code></a></span><span class="refpurpose"> — get current <code class="classname">LqrVMap</code> object in a <code class="classname">LqrVMapList</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-vmap-list-next.html"><code class="function">lqr_vmap_list_next</code></a></span><span class="refpurpose"> — advance the <code class="classname">LqrVMapList</code> object</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-vmap-list-foreach.html"><code class="function">lqr_vmap_list_foreach</code></a></span><span class="refpurpose"> — perform operations on all <code class="classname">LqrVMap</code> objects in an <code class="classname">LqrVMapList</code> object</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref-lqr-carver-list-foreach.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-pages.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-vmap-new.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_list_foreach</code>�</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_vmap_new</code></td></tr></table></div></body></html> ref-lqr-vmap-get-data.html 0000644 00000011643 15034750062 0011436 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_vmap_get_data</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-vmaps.html" title="Visibiliy maps"><link rel="prev" href="ref-lqr-vmap-destroy.html" title="lqr_vmap_destroy"><link rel="next" href="ref-lqr-vmap-get-depth.html" title="lqr_vmap_get_depth"></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_vmap_get_data</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-vmap-destroy.html">Prev</a>�</td><th width="60%" align="center">Visibiliy maps</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-vmap-get-depth.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-vmap-get-data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_vmap_get_data — get varous <code class="classname">LqrVMap</code> object quantities</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">gint* <b class="fsfunc">lqr_vmap_get_data</b>(</code></td><td>LqrVMap* <var class="pdparam">vmap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3717"></a><h2>Description</h2><p> The function <code class="function">lqr_vmap_get_data</code> returns an array with the data stored into the <code class="classname">LqrVMap</code> object pointed to by <em class="parameter"><code>vmap</code></em>, ordered first by row, then by column. </p><p> Reading the data requires retrieval of the other quantities, through the functions <a class="xref" href="ref-lqr-vmap-get-depth.html" title="lqr_vmap_get_depth"><span class="refentrytitle"><code class="function">lqr_vmap_get_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-width.html" title="lqr_vmap_get_width"><span class="refentrytitle"><code class="function">lqr_vmap_get_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-height.html" title="lqr_vmap_get_height"><span class="refentrytitle"><code class="function">lqr_vmap_get_height</code></span>(3)</a> and <a class="xref" href="ref-lqr-vmap-get-orientation.html" title="lqr_vmap_get_orientation"><span class="refentrytitle"><code class="function">lqr_vmap_get_orientation</code></span>(3)</a>. </p><p> See the <code class="classname">LqrVMap</code> objects format description in the page for <a class="xref" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"><span class="refentrytitle"><code class="function">lqr_vmap_new</code></span>(3)</a>. </p></div><div class="refsect1"><a name="idm3731"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"><span class="refentrytitle"><code class="function">lqr_vmap_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-depth.html" title="lqr_vmap_get_depth"><span class="refentrytitle"><code class="function">lqr_vmap_get_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-width.html" title="lqr_vmap_get_width"><span class="refentrytitle"><code class="function">lqr_vmap_get_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-height.html" title="lqr_vmap_get_height"><span class="refentrytitle"><code class="function">lqr_vmap_get_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-orientation.html" title="lqr_vmap_get_orientation"><span class="refentrytitle"><code class="function">lqr_vmap_get_orientation</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-lqr-vmap-destroy.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-vmaps.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-vmap-get-depth.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_vmap_destroy</code>�</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_vmap_get_depth</code></td></tr></table></div></body></html> attach-images.html 0000644 00000022710 15034750062 0010145 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Attaching extra images</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="api-manual.html" title="Chapter�2.�LqR library API user manual"><link rel="prev" href="vmaps.html" title="Dealing with the visibility maps (the seams)"><link rel="next" href="progress.html" title="Progress indicators"></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">Attaching extra images</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="vmaps.html">Prev</a>�</td><th width="60%" align="center">Chapter�2.�LqR library API user manual</th><td width="20%" align="right">�<a accesskey="n" href="progress.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="attach-images"></a>Attaching extra images</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="attach-images.html#attach-carver">Attaching a carver</a></span></dt><dt><span class="sect2"><a href="attach-images.html#access-attached">Accessing attached carvers</a></span></dt></dl></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="attach-carver"></a>Attaching a carver</h3></div></div></div><p> Given an <code class="classname">LqrCarver</code> object, it is possible to attach an arbitrary number of extra carvers to it: these will passively undergo the same carving process as the root carver. In order for this to be possible, the carvers must be all of the same size. </p><p> The function to use is simply: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_attach</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>LqrCarver* <var class="pdparam">aux</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> This attaches <em class="parameter"><code>aux</code></em> to <em class="parameter"><code>carver</code></em>. </p><p> It is not necessary that the parent <code class="classname">LqrCarver</code> is activated. In fact, a carver can be attached to a carver which is itself attached to another one. </p><p> Needless to say, no resizing operation should be done directly on an <code class="classname">LqrCarver</code> once it has been attached to another <code class="classname">LqrCarver</code>, and neither should the cancel method be invoked directly on them. </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p> The carvers always have to be attached <span class="emphasis"><em>before</em></span> loading visibility maps. </p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="access-attached"></a>Accessing attached carvers</h3></div></div></div><p> Attached carvers can be read-out in the same way as their parents. There are however also methods to span all them, in a way very similar to that in which internally dumped <code class="classname">LqrVMap</code>'s are accessed, but <code class="classname">LqrVMapList</code> objects are substitued in this case by <code class="classname">LqrCarverList</code> objects. </p><p> First, the starting point of the list has to be retreived through: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrCarverList* <b class="fsfunc">lqr_carver_list_start</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> Then, one can iterate through the attached carvers by using these two functions: </p><div class="funcsynopsis"><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_list_current</b>(</code></td><td>LqrCarverList* <var class="pdparam">list</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrCarverList* <b class="fsfunc">lqr_carver_list_next</b>(</code></td><td>LqrCarverList* <var class="pdparam">list</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> Here is a sample code usage: </p><div class="example"><a name="ex-attach-list1"></a><p class="title"><b>Example�2.10.�Accessing attached carvers #1</b></p><div class="example-contents"><pre class="programlisting"> LqrCarver *aux; LqrCarverList *list; list = lqr_carver_list_start (carver); while (list) { aux = lqr_carver_list_current (list); /* ... do something on aux ... */ list = lqr_carver_list_next (list); } </pre></div></div><p><br class="example-break"> </p><p> The carvers will always be accessed in the order in which they were attached. </p><p> Alternatively, one can apply a function to all the elements of the list (and recursively to all the elements of their attached lists, if there are any), through this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_list_foreach_recursive</b>(</code></td><td>LqrCarverList* <var class="pdparam">list</var>, </td></tr><tr><td>�</td><td>LqrCarverFunc <var class="pdparam">func</var>, </td></tr><tr><td>�</td><td>LqrDataTok <var class="pdparam">data</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> To use this second method, you'll need to define a function first, as in the following sample code: </p><div class="example"><a name="ex-attach-list2"></a><p class="title"><b>Example�2.11.�Accessing attached carvers #2</b></p><div class="example-contents"><pre class="programlisting"> LqrRetVal my_func (LqrCarver *aux, LqrDataTok data) { /* ... do something on aux ... */ return LQR_OK; } LqrCarverList *list; LqrDataTok data_tok; list = lqr_carver_list_start (carver); data_tok->data = NULL; lqr_carver_list_foreach_recursive (list, my_func, data_tok); </pre></div></div><p><br class="example-break"> </p><p> The data to be passed on to the LqrCarverFunc is of type <span class="structname">LqrDataTok</span>. This is defined as a union, with the following fields: </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><code class="classname">LqrCarver</code>* <em class="structfield"><code>carver</code></em></p></li><li class="listitem"><p><span class="type">gint</span> <em class="structfield"><code>integer</code></em></p></li><li class="listitem"><p><span class="type">gpointer</span> <em class="structfield"><code>data</code></em></p></li></ul></div><p> </p><p> In the above example, no data is actually passed on to the function. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> In actual code, the call to <code class="function">lqr_carver_list_foreach_recursive</code> should be protected to test its return value, which is <code class="literal"><span class="errorcode">LQR_OK</span></code> if all my_func calls have been successful (or if the list is empty), or it will hold the first non-successful return value from <code class="function">my_func</code>. </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="vmaps.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="api-manual.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="progress.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Dealing with the visibility maps (the seams)�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Progress indicators</td></tr></table></div></body></html> index.html 0000644 00000024237 15034750062 0006553 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>The Liquid Rescale library Manual</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="next" href="Introduction.html" title="Chapter�1.�Introduction"></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">The Liquid Rescale library Manual</th></tr><tr><td width="20%" align="left">�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="Introduction.html">Next</a></td></tr></table><hr></div><div lang="en" class="book"><div class="titlepage"><div><div><h1 class="title"><a name="liblqr-manual"></a>The Liquid Rescale library Manual</h1></div><div><div class="author"><h3 class="author"><span class="firstname">Carlo</span> <span class="surname">Baldassi</span></h3></div></div><div><p class="copyright">Copyright � 2007-2009 Carlo Baldassi</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="chapter"><a href="Introduction.html">1. Introduction</a></span></dt><dd><dl><dt><span class="sect1"><a href="Introduction.html#copyright">Copyright</a></span></dt><dt><span class="sect1"><a href="about-this-doc.html">About this document</a></span></dt><dt><span class="sect1"><a href="seam-carve.html">Seam carving in brief</a></span></dt><dd><dl><dt><span class="sect2"><a href="seam-carve.html#about-enlarge">About enlarging</a></span></dt></dl></dd><dt><span class="sect1"><a href="overview.html">Overview of the library</a></span></dt><dt><span class="sect1"><a href="basic.html">Basic methods</a></span></dt></dl></dd><dt><span class="chapter"><a href="api-manual.html">2. LqR library API user manual</a></span></dt><dd><dl><dt><span class="sect1"><a href="api-manual.html#signals">Signal handling</a></span></dt><dt><span class="sect1"><a href="generate-multi-size.html">Generating the multi-size image</a></span></dt><dd><dl><dt><span class="sect2"><a href="generate-multi-size.html#carver-new">Carver object creation</a></span></dt><dt><span class="sect2"><a href="generate-multi-size.html#carver-init">Carver activation</a></span></dt><dt><span class="sect2"><a href="generate-multi-size.html#image-type">Choosing the image type</a></span></dt></dl></dd><dt><span class="sect1"><a href="lqr.html">Liquid rescaling</a></span></dt><dd><dl><dt><span class="sect2"><a href="lqr.html#lqr-resize">The resizing method</a></span></dt><dt><span class="sect2"><a href="lqr.html#flatten">Flattening</a></span></dt><dt><span class="sect2"><a href="lqr.html#lqr-cancel">Cancelling an action</a></span></dt></dl></dd><dt><span class="sect1"><a href="read-out.html">Reading the multi-size image</a></span></dt><dd><dl><dt><span class="sect2"><a href="read-out.html#px-by-px">Pixel by pixel</a></span></dt><dt><span class="sect2"><a href="read-out.html#line-by-line">One line at a time</a></span></dt><dt><span class="sect2"><a href="read-out.html#reset">Resetting</a></span></dt></dl></dd><dt><span class="sect1"><a href="energy.html">Automatic feature detection</a></span></dt><dd><dl><dt><span class="sect2"><a href="energy.html#energy-foreword">Foreword</a></span></dt><dt><span class="sect2"><a href="energy.html#energy-builtin">Builtin energy functions</a></span></dt><dt><span class="sect2"><a href="energy.html#energy-custom">Custom energy functions</a></span></dt><dt><span class="sect2"><a href="energy.html#energy-readout">Reading out the energy</a></span></dt></dl></dd><dt><span class="sect1"><a href="bias.html">Adding a bias</a></span></dt><dd><dl><dt><span class="sect2"><a href="bias.html#bias-foreword">Foreword</a></span></dt><dt><span class="sect2"><a href="bias.html#bias-xy">Adding a bias pixel by pixel</a></span></dt><dt><span class="sect2"><a href="bias.html#bias-float">Using an array of floating-point values</a></span></dt><dt><span class="sect2"><a href="bias.html#bias-rgb">Using another image</a></span></dt><dt><span class="sect2"><a href="bias.html#bias-areas">Operating on a specific area</a></span></dt></dl></dd><dt><span class="sect1"><a href="rigmask.html">Adding a rigidity mask</a></span></dt><dd><dl><dt><span class="sect2"><a href="rigmask.html#rigmask-foreword">Foreword</a></span></dt><dt><span class="sect2"><a href="rigmask.html#rigmask-xy">Adding an individual rigidity coefficient to a pixel</a></span></dt><dt><span class="sect2"><a href="rigmask.html#rigmask-float">Using an array of floating-point values</a></span></dt><dt><span class="sect2"><a href="rigmask.html#rigmask-rgb">Using another image</a></span></dt><dt><span class="sect2"><a href="rigmask.html#rigmask-areas">Operating on a specific area</a></span></dt></dl></dd><dt><span class="sect1"><a href="tuning.html">Tuning</a></span></dt><dd><dl><dt><span class="sect2"><a href="tuning.html#lqr-enl-step">Setting the enlargement step</a></span></dt><dt><span class="sect2"><a href="tuning.html#res-order">Choosing the resize order</a></span></dt><dt><span class="sect2"><a href="tuning.html#switch-freq">Choosing the side switch frequency</a></span></dt><dt><span class="sect2"><a href="tuning.html#cache">Using the cache</a></span></dt></dl></dd><dt><span class="sect1"><a href="vmaps.html">Dealing with the visibility maps (the seams)</a></span></dt><dd><dl><dt><span class="sect2"><a href="vmaps.html#vmap-dump">Dumping the visibility map</a></span></dt><dt><span class="sect2"><a href="vmaps.html#activate-dump">Storing the visibility maps</a></span></dt><dt><span class="sect2"><a href="vmaps.html#access-vmap">Accessing the internally attached visibility maps</a></span></dt><dt><span class="sect2"><a href="vmaps.html#vmaps-objs">The visibility map objects</a></span></dt><dt><span class="sect2"><a href="vmaps.html#import-vmap">Importing a visibility map in a carver</a></span></dt><dt><span class="sect2"><a href="vmaps.html#save-load-vmaps">Saving and loading visibility maps to/from files</a></span></dt></dl></dd><dt><span class="sect1"><a href="attach-images.html">Attaching extra images</a></span></dt><dd><dl><dt><span class="sect2"><a href="attach-images.html#attach-carver">Attaching a carver</a></span></dt><dt><span class="sect2"><a href="attach-images.html#access-attached">Accessing attached carvers</a></span></dt></dl></dd><dt><span class="sect1"><a href="progress.html">Progress indicators</a></span></dt><dd><dl><dt><span class="sect2"><a href="progress.html#progress-init">Creating and attaching a progress report object</a></span></dt><dt><span class="sect2"><a href="progress.html#progress-set-up">Setting up progress hooks</a></span></dt><dt><span class="sect2"><a href="progress.html#progress-messages">Initial and ending progress messages</a></span></dt><dt><span class="sect2"><a href="progress.html#progress-upd-step">Progress update step</a></span></dt></dl></dd><dt><span class="sect1"><a href="release.html">Releasing the memory</a></span></dt></dl></dd><dt><span class="chapter"><a href="ref-pages.html">3. LqR library API reference</a></span></dt><dd><dl><dt><span class="sect1"><a href="ref-pages.html#ref-const">Types defined by the library</a></span></dt><dt><span class="sect1"><a href="ref-carve.html">Carver objects</a></span></dt><dt><span class="sect1"><a href="ref-vmaps.html">Visibiliy maps</a></span></dt><dt><span class="sect1"><a href="ref-energy.html">Energy</a></span></dt><dt><span class="sect1"><a href="ref-bias.html">Bias</a></span></dt><dt><span class="sect1"><a href="ref-rigmask.html">Rigidity masks</a></span></dt><dt><span class="sect1"><a href="ref-progress.html">Progress reports</a></span></dt></dl></dd><dt><span class="chapter"><a href="references.html">4. References</a></span></dt><dt><span class="appendix"><a href="app-new.html">A. API changes in new versions of the library</a></span></dt><dd><dl><dt><span class="sect1"><a href="app-new.html#app-new-0-4">New symbols in version 0.4</a></span></dt><dt><span class="sect1"><a href="app-new-0-3.html">New symbols in version 0.3</a></span></dt><dt><span class="sect1"><a href="app-new-0-2.html">New symbols in version 0.2</a></span></dt><dt><span class="sect1"><a href="app-deprecated.html">Deprecated symbols</a></span></dt></dl></dd></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>2.1. <a href="generate-multi-size.html#def-image-types">Image types assigned by default</a></dt><dt>2.2. <a href="progress.html#progress-mess-def">Default progress messages</a></dt><dt>3.1. <a href="ref-lqr-carver-new.html#ref-def-image-types">Image types assigned by default</a></dt></dl></div><div class="list-of-examples"><p><b>List of Examples</b></p><dl><dt>2.1. <a href="read-out.html#ex-read-out">A simple readout example</a></dt><dt>2.2. <a href="read-out.html#ex-read-out-ext">A simple readout example - extended version</a></dt><dt>2.3. <a href="read-out.html#ex-scan-line">Line-by-line readout example</a></dt><dt>2.4. <a href="read-out.html#ex-scan-line-ext">Line-by-line readout example - extended version</a></dt><dt>2.5. <a href="energy.html#ex-custom-en-decl">Custom energy declaration</a></dt><dt>2.6. <a href="energy.html#ex-custom-en-def">Custom energy definition and setup</a></dt><dt>2.7. <a href="vmaps.html#ex-vmaplist1">Accessing visibility maps #1</a></dt><dt>2.8. <a href="vmaps.html#ex-vmaplist2">Accessing visibility maps #2</a></dt><dt>2.9. <a href="vmaps.html#vmap-data">Reading visibility maps data</a></dt><dt>2.10. <a href="attach-images.html#ex-attach-list1">Accessing attached carvers #1</a></dt><dt>2.11. <a href="attach-images.html#ex-attach-list2">Accessing attached carvers #2</a></dt><dt>2.12. <a href="progress.html#ex-set-progress">Setting progress hooks</a></dt><dt>2.13. <a href="progress.html#ex-hook-decl">Progress hooks declaration</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">�</td><td width="20%" align="center">�</td><td width="40%" align="right">�<a accesskey="n" href="Introduction.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">�</td><td width="20%" align="center">�</td><td width="40%" align="right" valign="top">�Chapter�1.�Introduction</td></tr></table></div></body></html> ref-lqr-vmap-get-height.html 0000644 00000007706 15034750062 0012002 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_vmap_get_height</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-vmaps.html" title="Visibiliy maps"><link rel="prev" href="ref-lqr-vmap-get-width.html" title="lqr_vmap_get_width"><link rel="next" href="ref-lqr-vmap-get-orientation.html" title="lqr_vmap_get_orientation"></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_vmap_get_height</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-vmap-get-width.html">Prev</a>�</td><th width="60%" align="center">Visibiliy maps</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-vmap-get-orientation.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-vmap-get-height"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_vmap_get_height — get the height of an <code class="classname">LqrVMap</code> object</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">gint <b class="fsfunc">lqr_vmap_get_height</b>(</code></td><td>LqrVMap* <var class="pdparam">vmap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3844"></a><h2>Description</h2><p> The function <code class="function">lqr_vmap_get_height</code> returns the height of the <code class="classname">LqrVMap</code> object pointed to by <em class="parameter"><code>vmap</code></em>. </p><p> See the <code class="classname">LqrVMap</code> objects format description in the page for <a class="link" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"><code class="classname">LqrVMap</code> constructor and destructor</a>. </p></div><div class="refsect1"><a name="idm3854"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"><span class="refentrytitle"><code class="function">lqr_vmap_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-data.html" title="lqr_vmap_get_data"><span class="refentrytitle"><code class="function">lqr_vmap_get_data</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-depth.html" title="lqr_vmap_get_depth"><span class="refentrytitle"><code class="function">lqr_vmap_get_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-width.html" title="lqr_vmap_get_width"><span class="refentrytitle"><code class="function">lqr_vmap_get_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-orientation.html" title="lqr_vmap_get_orientation"><span class="refentrytitle"><code class="function">lqr_vmap_get_orientation</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-lqr-vmap-get-width.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-vmaps.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-vmap-get-orientation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_vmap_get_width</code>�</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_vmap_get_orientation</code></td></tr></table></div></body></html> rigmask.html 0000644 00000030522 15034750062 0007073 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Adding a rigidity mask</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="api-manual.html" title="Chapter�2.�LqR library API user manual"><link rel="prev" href="bias.html" title="Adding a bias"><link rel="next" href="tuning.html" title="Tuning"></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">Adding a rigidity mask</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bias.html">Prev</a>�</td><th width="60%" align="center">Chapter�2.�LqR library API user manual</th><td width="20%" align="right">�<a accesskey="n" href="tuning.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="rigmask"></a>Adding a rigidity mask</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="rigmask.html#rigmask-foreword">Foreword</a></span></dt><dt><span class="sect2"><a href="rigmask.html#rigmask-xy">Adding an individual rigidity coefficient to a pixel</a></span></dt><dt><span class="sect2"><a href="rigmask.html#rigmask-float">Using an array of floating-point values</a></span></dt><dt><span class="sect2"><a href="rigmask.html#rigmask-rgb">Using another image</a></span></dt><dt><span class="sect2"><a href="rigmask.html#rigmask-areas">Operating on a specific area</a></span></dt></dl></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="rigmask-foreword"></a>Foreword</h3></div></div></div><p> The rigidity parameter which is set at carver activation time (see section <a class="link" href="generate-multi-size.html#carver-init" title="Carver activation">Carver activation</a>) normally affects the whole image. It is possible, however, to specify which areas of the image should be affected by using a rigidity mask. </p><p> When a rigidity mask is used, each pixel of the image acquires an individual rigidity coefficient, which has to be multiplied with the overall rigidity parameter to get the actual pixel's rigidity. This is useful in some situations to reduce distorsions in specific areas of the image while keeping the seams optimal in other areas. </p><p> The library interface to deal with rigidity masks follows very closely the scheme for bias masks as described in the <a class="link" href="bias.html" title="Adding a bias">bias section</a>, the main difference being that no equivalent to the bias factor has to be provided (since it is already given in the <code class="function">lqr_carver_init</code> function). </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p> The rigidity mask has to be added always <span class="emphasis"><em>after</em></span> the <code class="classname">LqrCarver</code> initialization and <span class="emphasis"><em>before</em></span> resizing takes place. (Note that this is different from the bias, which instead can also be added to non-initialised carver objects.) </p></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p> Whenever a rigidity mask is set, all pixels for which the value is not explicitly defined will have coefficient 0, i.e. the rigidity setting will will be disabled. </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> All of the functions can be called multiple times, but their effect is not summed up, to the contrary of what happens for the bias functions; instead, new values will substitute old ones when the affected regions overlap. </p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="rigmask-xy"></a>Adding an individual rigidity coefficient to a pixel</h3></div></div></div><p> The function to use in order to set the rigidity mask at a given pixel is: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_rigmask_add_xy</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble <var class="pdparam">rigidity</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">x</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">y</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="rigmask-float"></a>Using an array of floating-point values</h3></div></div></div><p> It is possible to use a whole array of floating points at once through this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_rigmask_add</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble* <var class="pdparam">buffer</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> Here, <em class="parameter"><code>buffer</code></em> is an array contining the rigidity coefficients values, and it is assumed to have the same size as the image loaded in <em class="parameter"><code>carver</code></em>. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> This function, and all the following, will not swallow the buffer (to the contrary of what happens e.g. when creating a new <code class="classname">LqrCarver</code> object and allowing the default behaviour), therefore the buffer must be freed by the user afterwards. </p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="rigmask-rgb"></a>Using another image</h3></div></div></div><p> The rigidity mask can also be read from an 8-bit rgb buffer. This buffer has to be in the same format as the one used in the 8-bit LqrCarver constructor (but may have a different number of colours per channel). The function is: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_rigmask_add_rgb</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>guchar* <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">channels</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> As in the previous case, <em class="parameter"><code>buffer</code></em> is assumed to hold and image of the same size as the one in the <em class="parameter"><code>carver</code></em>. </p><p> The <em class="parameter"><code>buffer</code></em> contents will be transformed into floating-points by averaging the colour components and multiplying the result by the alpha channel (transparency) value. </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p> The existence of an alpha channel is inferred from the <em class="parameter"><code>channels</code></em> value: if this is 1 or 3, no alpha channel is assumed, if it is 2 or 4, it is assumed that the last channel is holds the alpha value. If this is not what you want, you should resort to one of the previous methods. </p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="rigmask-areas"></a>Operating on a specific area</h3></div></div></div><p> The two previously described functions operate on the whole <code class="classname">LqrCarver</code> image. It is also possible to access specific image regions in a similar way; for the floating point use: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_rigmask_add_area</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble* <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">x_off</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">y_off</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> while for the rgb image use: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_rigmask_add_rgb_area</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>guchar* <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">channels</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">x_off</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">y_off</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> In both functions, <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> are used to specify the size of the area of interest, while <em class="parameter"><code>x_off</code></em> and <em class="parameter"><code>y_off</code></em> specify its offset. For the rest, both functions work in the same way as their global couterpart. </p><p> The provided buffers have to be of size <code class="literal"><em class="parameter"><code>width</code></em> * <em class="parameter"><code>height</code></em></code> (or <code class="literal"><em class="parameter"><code>width</code></em> * <em class="parameter"><code>height</code></em> * <em class="parameter"><code>channels</code></em></code> for the rgb case) but the specified areas need not to be strictly included inside the <code class="classname">LqrCarver</code> image area: only the parts which overlap with it will be used. For example, the offsets can also be negative. </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bias.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="api-manual.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="tuning.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Adding a bias�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Tuning</td></tr></table></div></body></html> bias.html 0000644 00000027774 15034750062 0006373 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Adding a bias</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="api-manual.html" title="Chapter�2.�LqR library API user manual"><link rel="prev" href="energy.html" title="Automatic feature detection"><link rel="next" href="rigmask.html" title="Adding a rigidity mask"></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">Adding a bias</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="energy.html">Prev</a>�</td><th width="60%" align="center">Chapter�2.�LqR library API user manual</th><td width="20%" align="right">�<a accesskey="n" href="rigmask.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="bias"></a>Adding a bias</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="bias.html#bias-foreword">Foreword</a></span></dt><dt><span class="sect2"><a href="bias.html#bias-xy">Adding a bias pixel by pixel</a></span></dt><dt><span class="sect2"><a href="bias.html#bias-float">Using an array of floating-point values</a></span></dt><dt><span class="sect2"><a href="bias.html#bias-rgb">Using another image</a></span></dt><dt><span class="sect2"><a href="bias.html#bias-areas">Operating on a specific area</a></span></dt></dl></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="bias-foreword"></a>Foreword</h3></div></div></div><p> The automatic feature detection can be driven manually by adding a bias to the pixels of the image. </p><p> For example, it is possible to protect regions of the image by adding a positive bias to the corresponding pixels. This will make the seams more unlikely to cross those regions, thus avoiding distortion (but increasing distortion of the other regions). </p><p> It is also possible to make the seams more likely to cross some regions by adding a negative bias to them. In this case, reducing the size of the image will tend to erase those regions, while (possibly) keeping the rest of the image in a consistent state. </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p> The bias has to be added before the resizing takes place (but it can be added before initialisation since version 0.4). </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> In all of the bias-related functions, the bias is added on top of the existing one, so that all of the functions can be called multiple times. </p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="bias-xy"></a>Adding a bias pixel by pixel</h3></div></div></div><p> The function to use in order to add a bias to a given pixel is: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_bias_add_xy</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble <var class="pdparam">bias</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">x</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">y</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> Typical values for the <em class="parameter"><code>bias</code></em> parameter would be between <code class="literal">100</code> and <code class="literal">10000</code> in module. </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="bias-float"></a>Using an array of floating-point values</h3></div></div></div><p> It is possible to use a whole array of floating points at once through this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_bias_add</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble* <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">bias_factor</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> Here, <em class="parameter"><code>buffer</code></em> is an array contining the bias values, and it is assumed to have the same size as the image loaded in <em class="parameter"><code>carver</code></em>, while <em class="parameter"><code>bias_factor</code></em> is an overall bias factor, which can be used to affect the global bias level: if the elements of <em class="parameter"><code>buffer</code></em> are of order 1, a standard choice for the bias_factor would be between <code class="literal">100</code> and <code class="literal">10000</code> (in module). </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> This function, and all the following, will not swallow the buffer (to the contrary of what happens e.g. when creating a new <code class="classname">LqrCarver</code> object and allowing the default behaviour), therefore the buffer must be freed by the user afterwards. </p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="bias-rgb"></a>Using another image</h3></div></div></div><p> The bias can also be read from an 8-bit rgb buffer. This buffer has to be in the same format as the one used in the 8-bit LqrCarver constructor (but may have a different number of colours per channel). The function is: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_bias_add_rgb</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>guchar* <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">bias_factor</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">channels</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> As in the previous case, <em class="parameter"><code>buffer</code></em> is assumed to hold and image of the same size as the one in the <em class="parameter"><code>carver</code></em>. </p><p> The <em class="parameter"><code>buffer</code></em> contents will be transformed into floating-points by averaging the colour components and multiplying the result by the alpha channel (transparency) value. </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p> The existence of an alpha channel is inferred from the <em class="parameter"><code>channels</code></em> value: if this is 1 or 3, no alpha channel is assumed, if it is 2 or 4 or greater, it is assumed that the last channel holds the alpha value. If this is not what you want, you should resort to one of the previous methods. </p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="bias-areas"></a>Operating on a specific area</h3></div></div></div><p> The two previously described functions operate on the whole <code class="classname">LqrCarver</code> image. It is also possible to access specific image regions in a similar way; for the floating point case use: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_bias_add_area</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble* <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">bias_factor</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">x_off</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">y_off</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> while for the rgb image case use: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_bias_add_rgb_area</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>guchar* <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">bias_factor</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">channels</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">x_off</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">y_off</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> In both functions, <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> are used to specify the size of the area of interest, while <em class="parameter"><code>x_off</code></em> and <em class="parameter"><code>y_off</code></em> specify its offset. For the rest, both functions work in the same way as their global couterpart. </p><p> The provided buffers have to be of size <code class="literal"><em class="parameter"><code>width</code></em> * <em class="parameter"><code>height</code></em></code> (or <code class="literal"><em class="parameter"><code>width</code></em> * <em class="parameter"><code>height</code></em> * <em class="parameter"><code>channels</code></em></code> for the rgb case) but the specified areas need not to be strictly included inside the <code class="classname">LqrCarver</code> image area: only the parts which overlap with it will be used. For example, the offsets can also be negative. </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="energy.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="api-manual.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="rigmask.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Automatic feature detection�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Adding a rigidity mask</td></tr></table></div></body></html> ref-lqr-rwindow-get-radius.html 0000644 00000007424 15034750062 0012544 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_rwindow_get_radius</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-energy.html" title="Energy"><link rel="prev" href="ref-lqr-rwindow-get-read-t.html" title="lqr_rwindow_get_read_t"><link rel="next" href="ref-lqr-rwindow-get-channels.html" title="lqr_rwindow_get_channels"></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_rwindow_get_radius</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-rwindow-get-read-t.html">Prev</a>�</td><th width="60%" align="center">Energy</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-rwindow-get-channels.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-rwindow-get-radius"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_rwindow_get_radius — get the size of the region accessible from a <code class="classname">LqrReadingWindow</code> object</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">gint <b class="fsfunc">lqr_rwindow_get_radius</b>(</code></td><td>LqrReadingWindow* <var class="pdparam">rwindow</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4651"></a><h2>Description</h2><p> The function <code class="function">lqr_rwindow_get_radius</code> returns the radius of the region accessible through the reading window <em class="parameter"><code>rwindow</code></em>. </p><p> The region is a square of size <code class="literal">2 * <em class="parameter"><code>radius</code></em> - 1</code> pixels. </p></div><div class="refsect1"><a name="idm4659"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-set-energy-function.html" title="lqr_carver_set_energy_function"><span class="refentrytitle"><code class="function">lqr_carver_set_energy_function</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-read.html" title="lqr_rwindow_read"><span class="refentrytitle"><code class="function">lqr_rwindow_read</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-read-t.html" title="lqr_rwindow_get_read_t"><span class="refentrytitle"><code class="function">lqr_rwindow_get_read_t</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-channels.html" title="lqr_rwindow_get_channels"><span class="refentrytitle"><code class="function">lqr_rwindow_get_channels</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-lqr-rwindow-get-read-t.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-energy.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-rwindow-get-channels.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_rwindow_get_read_t</code>�</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_rwindow_get_channels</code></td></tr></table></div></body></html> ref-lqr-carver-resize.html 0000644 00000015655 15034750062 0011577 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_resize</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-set-black-channel.html" title="lqr_carver_set_black_channel"><link rel="next" href="ref-lqr-carver-flatten.html" title="lqr_carver_flatten"></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_resize</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-set-black-channel.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-flatten.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-resize"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_resize — liquid rescale a <code class="classname">LqrCarver</code> object</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">LqrRetVal <b class="fsfunc">lqr_carver_resize</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">new_width</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">new_height</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2156"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_resize</code> performs the liquid rescaling over the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>. If a visibility map was loaded through the function <code class="function">lqr_vmap_load</code>, and the carver was not initialised, the resizing operations must be limited to the direction and the sizes included in the loaded map. If the carver was initialised through the function <code class="function">lqr_carver_init</code>, there are no limitations to the final size. </p><p> The resizing function can be called multiple times, and it will decide automatically whether the computation of the visibility map is necessary or not. In case it isn't, the function returns almost immediately, otherwise operations will proceed following the order given through the function <code class="function">lqr_carver_set_resize_order</code>. Currently, on-the-fly rescaling without computation is only possible for a single direction at a time. </p><p> If the new size (in one direction or in both) is greater than or equal to the original size multiplied by the enlargement step of the <em class="parameter"><code>carver</code></em> object (as obtained through <a class="xref" href="ref-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_get_enl_step</code></span>(3)</a>), the rescaling will be performed in multiple steps. At each step, the original size stored internally is reset to the new value; therefore, each step in the process can be bigger then the previous one. </p><p> Whenever the resizing dirction changes (this may happen in a single call of the rescaling function or through multiple calls), or if performing a multiple steps enlargement as per the previous paragraph, the visibility map computed during the first direction rescale is dropped to make place for the one for the second (and the original size of the image is reset to the current value). These visibility maps can be saved by using the <code class="function">lqr_carver_set_vmap_dump</code> function, for inspection or future use. </p></div><div class="refsect1"><a name="idm2171"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. It returns an error if trying to exceed the limitations of a loaded visibility map, or if passed a negative or null size. </p></div><div class="refsect1"><a name="idm2174"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></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-flatten.html" title="lqr_carver_flatten"><span class="refentrytitle"><code class="function">lqr_carver_flatten</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_set_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_get_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-cancel.html" title="lqr_carver_cancel"><span class="refentrytitle"><code class="function">lqr_carver_cancel</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-load.html" title="lqr_vmap_load"><span class="refentrytitle"><code class="function">lqr_vmap_load</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-lqr-carver-set-black-channel.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-flatten.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_set_black_channel</code>�</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_flatten</code></td></tr></table></div></body></html> ref-rigmask.html 0000644 00000004545 15034750062 0007653 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Rigidity masks</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-pages.html" title="Chapter�3.�LqR library API reference"><link rel="prev" href="ref-lqr-carver-bias-clear.html" title="lqr_carver_bias_clear"><link rel="next" href="ref-lqr-carver-rigmask-add.html" title="lqr_carver_rigmask_add"></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">Rigidity masks</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-bias-clear.html">Prev</a>�</td><th width="60%" align="center">Chapter�3.�LqR library API reference</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-rigmask-add.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ref-rigmask"></a>Rigidity masks</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="ref-lqr-carver-rigmask-add.html"><code class="function">lqr_carver_rigmask_add</code></a></span><span class="refpurpose"> — update an <code class="classname">LqrCarver</code> rigidity mask</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-carver-rigmask-clear.html"><code class="function">lqr_carver_rigmask_clear</code></a></span><span class="refpurpose"> — clear an <code class="classname">LqrCarver</code> rigidity mask</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref-lqr-carver-bias-clear.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-pages.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-carver-rigmask-add.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_bias_clear</code>�</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_rigmask_add</code></td></tr></table></div></body></html> ref-lqr-rwindow-get-channels.html 0000644 00000010242 15034750062 0013040 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_rwindow_get_channels</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-energy.html" title="Energy"><link rel="prev" href="ref-lqr-rwindow-get-radius.html" title="lqr_rwindow_get_radius"><link rel="next" href="ref-lqr-carver-set-gradient-function.html" title="lqr_carver_set_gradient_function"></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_rwindow_get_channels</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-rwindow-get-radius.html">Prev</a>�</td><th width="60%" align="center">Energy</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-gradient-function.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-rwindow-get-channels"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_rwindow_get_channels — get the number of channels of a <code class="classname">LqrReadingWindow</code> object</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">gint <b class="fsfunc">lqr_rwindow_get_channels</b>(</code></td><td>LqrReadingWindow* <var class="pdparam">rwindow</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4688"></a><h2>Description</h2><p> The function <code class="function">lqr_rwindow_get_channels</code> returns the number of channels of reading window <em class="parameter"><code>rwindow</code></em>. </p><p> This function is actually only necessary when the <em class="parameter"><code>rwindow</code></em> reader type is <code class="literal">LQR_ER_CUSTOM</code>. </p><p> The reader types are described in the page for <a class="xref" href="ref-lqr-carver-set-energy-function.html" title="lqr_carver_set_energy_function"><span class="refentrytitle"><code class="function">lqr_carver_set_energy_function</code></span>(3)</a>. </p></div><div class="refsect1"><a name="idm4698"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-set-energy-function.html" title="lqr_carver_set_energy_function"><span class="refentrytitle"><code class="function">lqr_carver_set_energy_function</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-read.html" title="lqr_rwindow_read"><span class="refentrytitle"><code class="function">lqr_rwindow_read</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-read-t.html" title="lqr_rwindow_get_read_t"><span class="refentrytitle"><code class="function">lqr_rwindow_get_read_t</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-radius.html" title="lqr_rwindow_get_radius"><span class="refentrytitle"><code class="function">lqr_rwindow_get_radius</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-lqr-rwindow-get-radius.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-energy.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-gradient-function.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_rwindow_get_radius</code>�</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_set_gradient_function</code></td></tr></table></div></body></html> ref-lqr-carver-bias-add.html 0000644 00000024770 15034750062 0011740 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_bias_add</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-bias.html" title="Bias"><link rel="prev" href="ref-bias.html" title="Bias"><link rel="next" href="ref-lqr-carver-bias-clear.html" title="lqr_carver_bias_clear"></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_bias_add</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-bias.html">Prev</a>�</td><th width="60%" align="center">Bias</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-bias-clear.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-bias-add"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_bias_add_xy, lqr_carver_bias_add_area, lqr_carver_bias_add, lqr_carver_bias_add_rgb_area, lqr_carver_bias_add_rgb — update an <code class="classname">LqrCarver</code> bias</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">LqrRetVal <b class="fsfunc">lqr_carver_bias_add_xy</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble <var class="pdparam">bias</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">x</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">y</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">LqrRetVal <b class="fsfunc">lqr_carver_bias_add_area</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble* <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">bias_factor</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">x_off</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">y_off</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">LqrRetVal <b class="fsfunc">lqr_carver_bias_add</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble* <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">bias_factor</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">LqrRetVal <b class="fsfunc">lqr_carver_bias_add_rgb_area</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble* <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">bias_factor</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">channels</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">x_off</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">y_off</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">LqrRetVal <b class="fsfunc">lqr_carver_bias_add_rgb</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gdouble* <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">bias_factor</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">channels</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4863"></a><h2>Foreword</h2><p> All the functions described in this page are used to add a bias to <code class="classname">LqrCarver</code> objects. A positive biased pixel will be more likely to be avoided by seams, and thus be preserved during rescaling, while a negative bias has the opposite effect. </p><p> All of these functions must be called before <a class="xref" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a>. If called multiple times, the biases added at each call will sum up. </p></div><div class="refsect1"><a name="idm4869"></a><h2>Adding a bias pixel by pixel</h2><p> The function <code class="function">lqr_carver_bias_add_xy</code> adds a bias to the <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> pixel of the image loaded into the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> </p><p> A typical value for <em class="parameter"><code>bias_factor</code></em> would be <code class="literal">1000</code> (in absolute value). </p></div><div class="refsect1"><a name="idm4880"></a><h2>Adding a bias from a buffer</h2><p> The function <code class="function">lqr_carver_bias_add_area</code> adds a bias to an area of the image loaded into the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>. </p><p> The parameter <em class="parameter"><code>buffer</code></em> must point to an array of <span class="type">doubles</span> of size <code class="literal"><em class="parameter"><code>width</code></em> * <em class="parameter"><code>height</code></em></code>, ordered first by rows, then by columns. </p><p> The offset of the area relative to the image can be specified through <em class="parameter"><code>x_off</code></em> and <em class="parameter"><code>y_off</code></em>. The bias area can exceed the boundary of the image, and the offsets can be negative. </p><p> The parameter <em class="parameter"><code>bias_factor</code></em> is an overall bias scale. A typical value when the buffer contents are of the order of <code class="literal">1</code> would be <code class="literal">1000</code> (in absolute value). </p><p> The function <code class="function">lqr_carver_bias_add</code> can be used when the area to add is of the same size of the image loaded in the <code class="classname">LqrCarver</code> object and the offsets are <code class="literal">0</code>. </p></div><div class="refsect1"><a name="idm4903"></a><h2>Adding a bias from an image</h2><p> The functions <code class="function">lqr_carver_bias_add_rgb_area</code> and <code class="function">lqr_carver_bias_add_rgb</code> are very similar to <code class="function">lqr_carver_bias_add_area</code> and <code class="function">lqr_carver_bias_add</code>, except that they use 8-bit multi-channel images as inputs. </p><p> The number of channels in the image is passed via the parameter <em class="parameter"><code>channels</code></em>. The last channel is assumed to be the alpha (opacity) channel if <em class="parameter"><code>channels</code></em> is equal to <code class="literal">2</code> or greater than <code class="literal">3</code> (if this is not the case, use the previous functions). </p><p> The bias is computed from the average of the colour channels, multiplied by the value of the alpha channel if present. For example, in RGBA images a white, nontransparent pixel is equivalent to a value of <code class="literal">1.0</code> when using a buffer in <code class="function">lqr_carver_bias_add_area</code>. </p></div><div class="refsect1"><a name="idm4918"></a><h2>Return values</h2><p> The return values follow the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm4921"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></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-rigmask-add.html" title="lqr_carver_rigmask_add"><span class="refentrytitle"><code class="function">lqr_carver_rigmask_add</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-bias.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-bias.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-carver-bias-clear.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Bias�</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_bias_clear</code></td></tr></table></div></body></html> ref-lqr-carver-list-foreach.html 0000644 00000015311 15034750062 0012643 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_list_foreach</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-list-next.html" title="lqr_carver_list_next"><link rel="next" href="ref-vmaps.html" title="Visibiliy maps"></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_list_foreach</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-list-next.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-vmaps.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-list-foreach"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_list_foreach — perform operations on all <code class="classname">LqrCarver</code> objects in an <code class="classname">LqrCarverList</code> object</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">LqrRetVal <b class="fsfunc">lqr_carver_list_foreach</b>(</code></td><td>LqrCarverList* <var class="pdparam">list</var>, </td></tr><tr><td>�</td><td>LqrCarverFunc <var class="pdparam">func</var>, </td></tr><tr><td>�</td><td>LqrDataTok <var class="pdparam">data</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">LqrRetVal <b class="fsfunc">lqr_carver_list_foreach_recursive</b>(</code></td><td>LqrCarverList* <var class="pdparam">list</var>, </td></tr><tr><td>�</td><td>LqrCarverFunc <var class="pdparam">func</var>, </td></tr><tr><td>�</td><td>LqrDataTok <var class="pdparam">data</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3542"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_list_foreach</code> can be used to apply the function <em class="parameter"><code>func</code></em> to all the <code class="classname">LqrCarver</code> objects listed in <em class="parameter"><code>list</code></em>. The parameter <em class="parameter"><code>data</code></em> is used to pass arguments to the function. </p><p> The <em class="parameter"><code>list</code></em> value should be obtained through the function <a class="xref" href="ref-lqr-carver-list-start.html" title="lqr_carver_list_start"><span class="refentrytitle"><code class="function">lqr_carver_list_start</code></span>(3)</a>. The order in the list will then follow the one in which carver objects were attached. </p><p> The function <em class="parameter"><code>func</code></em> is of type <code class="classname">LqrCarverFunc</code>, whose prototype is defined by: </p><pre class="programlisting"> typedef LqrRetVal (*LqrCarverFunc) (LqrCarver *carver, LqrDataTok data); </pre><p> The <em class="parameter"><code>data</code></em> argument is of type <span class="structname">LqrDataTok</span>, which is defined as a union with the following fields: </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><span class="type"><code class="classname">LqrCarver</code>*</span> <em class="structfield"><code>carver</code></em></p></li><li class="listitem"><p><span class="type">gint</span> <em class="structfield"><code>integer</code></em></p></li><li class="listitem"><p><span class="type">gpointer</span> <em class="structfield"><code>data</code></em></p></li></ul></div><p> </p><p> The function <code class="function">lqr_carver_list_foreach_recursive</code> is equivelant to <code class="function">lqr_carver_list_foreach</code>, but it works recursively if the <code class="classname">LqrCarver</code> objects in <em class="parameter"><code>list</code></em> have themselves other attached <code class="classname">LqrCarver</code> objects attached. In this case, the function <em class="parameter"><code>func</code></em> will be applied to each element of the list and to each element of the attached list recursively, before moving on to the next element. </p></div><div class="refsect1"><a name="idm3580"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-carver-attach.html" title="lqr_carver_attach"><span class="refentrytitle"><code class="function">lqr_carver_attach</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-start.html" title="lqr_carver_list_start"><span class="refentrytitle"><code class="function">lqr_carver_list_start</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-current.html" title="lqr_carver_list_current"><span class="refentrytitle"><code class="function">lqr_carver_list_current</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-next.html" title="lqr_carver_list_next"><span class="refentrytitle"><code class="function">lqr_carver_list_next</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-lqr-carver-list-next.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-vmaps.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_list_next</code>�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Visibiliy maps</td></tr></table></div></body></html> basic.html 0000644 00000012426 15034750062 0006522 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Basic methods</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="Introduction.html" title="Chapter�1.�Introduction"><link rel="prev" href="overview.html" title="Overview of the library"><link rel="next" href="api-manual.html" title="Chapter�2.�LqR library API user manual"></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">Basic methods</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="overview.html">Prev</a>�</td><th width="60%" align="center">Chapter�1.�Introduction</th><td width="20%" align="right">�<a accesskey="n" href="api-manual.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="basic"></a>Basic methods</h2></div></div></div><p> Following is a list of the basic public methods associated with the <code class="classname">LqrCarver</code> objects: </p><p> </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> constructors and destructor </p><p> </p><pre class="programlisting"> LqrCarver * lqr_carver_new (guchar *buffer, gint width, gint height, gint channels); LqrCarver * lqr_carver_new_ext (void *buffer, gint width, gint height, gint channels, LqrColDepth colour_depth); void lqr_carver_destroy (LqrCarver *carver); </pre><p> </p></li><li class="listitem"><p> initialization </p><p> </p><pre class="programlisting"> LqrRetVal lqr_carver_init (LqrCarver *carver, gint delta_x, gfloat rigidity); </pre><p> </p></li><li class="listitem"><p> image manipulations </p><p> </p><pre class="programlisting"> LqrRetVal lqr_carver_resize (LqrCarver *carver, gint new_width, gint new_width); LqrRetVal lqr_carver_flatten (LqrCarver *carver); </pre><p> </p></li><li class="listitem"><p> readout </p><p> </p><pre class="programlisting"> gboolean lqr_carver_scan (LqrCarver *carver, gint *x, gint *y, guchar **rgb); gboolean lqr_carver_scan_ext (LqrCarver *carver, gint *x, gint *y, void **rgb); gboolean lqr_carver_scan_by_row (LqrCarver *carver); gboolean lqr_carver_scan_line (LqrCarver *carver, gint *n, guchar **rgb); gboolean lqr_carver_scan_line_ext (LqrCarver *carver, gint *n, void **rgb); </pre><p> </p></li><li class="listitem"><p> get values </p><p> </p><pre class="programlisting"> gint lqr_carver_get_width (LqrCarver *carver); gint lqr_carver_get_height (LqrCarver *carver); gint lqr_carver_get_channels (LqrCarver *carver); LqrColDepth lqr_carver_get_col_depth (LqrCarver *carver); </pre><p> </p></li></ul></div><p> </p><p> The fastest way to see how they work is having a look at the code of <code class="filename">examples/liquidrescale-basic.cpp</code>, which is a very simple and fully commented demostrative program. </p><p> The return value of many functions is of type <code class="classname">LqrRetVal</code>. This is just an enum type which can be used for signal handling, see the <a class="link" href="api-manual.html#signals" title="Signal handling">Signal handling section</a>. </p><p> The other classes are optional: the class <code class="classname">LqrVMap</code> is used to hold the carving information (and the class <code class="classname">LqrVMapList</code> is used to retrieve it from the <code class="classname">LqrCarver</code> ojects); the class <code class="classname">LqrProgress</code> is used to customize progress report from the resizing engine (by default it is turned off). </p><p> A complete list of the library public methods can be found in the reference at the end of this document. </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="overview.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="Introduction.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="api-manual.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Overview of the library�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Chapter�2.�LqR library API user manual</td></tr></table></div></body></html> tuning.html 0000644 00000024333 15034750062 0006745 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Tuning</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="api-manual.html" title="Chapter�2.�LqR library API user manual"><link rel="prev" href="rigmask.html" title="Adding a rigidity mask"><link rel="next" href="vmaps.html" title="Dealing with the visibility maps (the seams)"></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">Tuning</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="rigmask.html">Prev</a>�</td><th width="60%" align="center">Chapter�2.�LqR library API user manual</th><td width="20%" align="right">�<a accesskey="n" href="vmaps.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tuning"></a>Tuning</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="tuning.html#lqr-enl-step">Setting the enlargement step</a></span></dt><dt><span class="sect2"><a href="tuning.html#res-order">Choosing the resize order</a></span></dt><dt><span class="sect2"><a href="tuning.html#switch-freq">Choosing the side switch frequency</a></span></dt><dt><span class="sect2"><a href="tuning.html#cache">Using the cache</a></span></dt></dl></div><p> The behaviour can be tuned through some additional functions. </p><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="lqr-enl-step"></a>Setting the enlargement step</h3></div></div></div><p> As mentioned in <a class="link" href="seam-carve.html#about-enlarge" title="About enlarging">About enlarging</a>, if the requested final size is too big, the rescaling is automatically divided in steps. </p><p> For example, let us suppose that we have created an <code class="classname">LqrCarver</code> object from a 100 by 100 pixels image, and that we call <code class="function">lqr_carver_resize</code> with 600 and 100 as width and height arguments. With the default settings, the rescaling of the width will be performed in 3 steps: first, from 100 to 199, then from 199 to 397, and finally from 397 to 600. </p><p> The rule here is that the maximum size which can be reached in a single step is equal to twice the original size minus one, and that at each step the original size is reset to the current size (through an internal call to <code class="function">lqr_carver_flatten</code>). </p><p> In most situations, however, the steps should be smaller in order to obtain good results. This can be set with this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_set_enl_step</b>(</code></td><td> LqrCarver * <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td> gfloat <var class="pdparam">enl_step</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> The value of <em class="parameter"><code>enl_step</code></em> must be strictly grater then 1.0 and less then (or equal to) 2.0. The default value is 2.0 (for back-compatibility reasons); any other value will result in the function returning an error. The new maximum size for a step will then be obtained by multiplying the original size by the enlargement step and subtracting 1. </p><p> The current value of the enlargement step can be retrieved with this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">gfloat <b class="fsfunc">lqr_carver_get_enl_step</b>(</code></td><td> LqrCarver * <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="res-order"></a>Choosing the resize order</h3></div></div></div><p> When the function <code class="function">lqr_carver_resize</code> is asked to resize along both directions in a single step, it has to choose which direction to resize first. The resize order can be changed through this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">lqr_carver_set_resize_order</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>LqrResizeOrder <var class="pdparam">resize_order</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> The possible values for resize_order are: </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">LQR_RES_ORDER_HOR</code></span></dt><dd><p> resize horizonally first (this is the default) </p></dd><dt><span class="term"><code class="literal">LQR_RES_ORDER_VERT</code></span></dt><dd><p> resize vertically first </p></dd></dl></div><p> </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="switch-freq"></a>Choosing the side switch frequency</h3></div></div></div><p> When the function <code class="function">lqr_carver_resize</code> is invoked, it chooses at each step the optimal seam to carve based on the relvance value for each pixel. However, in the case two seams are equivalent (which may happen when large portions of the image have the same colour, for example), the algorithm always chooses the seams from one side, which might be a problem (e.g. an object centered in the original image might not be centered any more in the resulting image). </p><p> In order to overcome this effect, an option is given to automatically switch the favoured side during rescaling, at the cost of a slightly worse performance. The number of times such a switching event occurs for each rescale operation can be set using the function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">lqr_carver_set_side_switch_frequency</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>guint <var class="pdparam">switch_frequency</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> The default value for newly created <code class="classname">LqrCarver</code> objects is <code class="literal">0</code>, which is equivalent to disabling this feature. Giving a value greater than the number of pixels by which to rescale produces a switch for each pixel, therefore you could set <em class="parameter"><code>switch_freqency</code></em> to a ridicolously high value in order to be sure to get this effect. </p><p> As for the final result, a very small value (e.g. <code class="literal">1<code class="literal"> to </code>4</code>) will normally suffice to balance the left and right side of the image (or the top and the bottom sides for vertical rescalings), without noticeable computational costs. However, in order to obtain a smoother behaviour for the visibiliy map, i.e. for the intermediate steps, higher values may be required. </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="cache"></a>Using the cache</h3></div></div></div><p> By default, the library tries to cache some quantities in order to save computational time. The cache may be disabled in order to save memory instead, using this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">lqr_carver_set_use_cache</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gboolean <var class="pdparam">use_cache</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> To disable the cache, set <em class="parameter"><code>use_cache</code></em> to <code class="literal">FALSE</code>. To re-enable it back, set it to <code class="literal">TRUE</code>. </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="rigmask.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="api-manual.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="vmaps.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Adding a rigidity mask�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Dealing with the visibility maps (the seams)</td></tr></table></div></body></html> ref-lqr-carver-set-use-cache.html 0000644 00000010414 15034750062 0012710 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_set_use_cache</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-set-preserve-input-image.html" title="lqr_carver_set_preserve_input_image"><link rel="next" href="ref-lqr-carver-attach.html" title="lqr_carver_attach"></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_set_use_cache</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-set-preserve-input-image.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-attach.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-set-use-cache"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_set_use_cache — enable/disable <code class="classname">LqrCarver</code> object cache</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">void <b class="fsfunc">lqr_carver_set_use_cache</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gboolean <var class="pdparam">use_cache</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3311"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_set_use_cache</code> can be used to disable or enable the cache for the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>. </p><p> By default, the caching is on. </p></div><div class="refsect1"><a name="idm3318"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_set_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-resize-order.html" title="lqr_carver_set_resize_order"><span class="refentrytitle"><code class="function">lqr_carver_set_resize_order</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><span class="refentrytitle"><code class="function">lqr_carver_set_dump_vmaps</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-side-switch-frequency.html" title="lqr_carver_set_side_switch_frequency"><span class="refentrytitle"><code class="function">lqr_carver_set_side_switch_frequency</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</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-lqr-carver-set-preserve-input-image.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-attach.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_set_preserve_input_image</code>�</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_attach</code></td></tr></table></div></body></html> Introduction.html 0000644 00000006042 15034750062 0010117 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�1.�Introduction</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="index.html" title="The Liquid Rescale library Manual"><link rel="prev" href="index.html" title="The Liquid Rescale library Manual"><link rel="next" href="about-this-doc.html" title="About this document"></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">Chapter�1.�Introduction</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="about-this-doc.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="Introduction"></a>Chapter�1.�Introduction</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect1"><a href="Introduction.html#copyright">Copyright</a></span></dt><dt><span class="sect1"><a href="about-this-doc.html">About this document</a></span></dt><dt><span class="sect1"><a href="seam-carve.html">Seam carving in brief</a></span></dt><dd><dl><dt><span class="sect2"><a href="seam-carve.html#about-enlarge">About enlarging</a></span></dt></dl></dd><dt><span class="sect1"><a href="overview.html">Overview of the library</a></span></dt><dt><span class="sect1"><a href="basic.html">Basic methods</a></span></dt></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="copyright"></a>Copyright</h2></div></div></div><p> Liquid Rescale Library Manual. Copyright (C) 2007-2009 Carlo Baldassi <code class="email"><<a class="email" href="mailto:carlobaldassi@gmail.com">carlobaldassi@gmail.com</a>></code> </p><p> This manual is released under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 dated June, 2007. </p><p> You should have received a copy of the GNU General Public License along with the library; if not, see <a class="ulink" href="http://www.gnu.org/licenses" target="_top">http://www.gnu.org/licenses</a> </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a>�</td><td width="20%" align="center">�</td><td width="40%" align="right">�<a accesskey="n" href="about-this-doc.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The Liquid Rescale library Manual�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�About this document</td></tr></table></div></body></html> ref-lqr-carver-scan-reset.html 0000644 00000007026 15034750062 0012333 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_scan_reset</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-cancel.html" title="lqr_carver_cancel"><link rel="next" href="ref-lqr-carver-scan.html" title="lqr_carver_scan"></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_scan_reset</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-cancel.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-scan.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-scan-reset"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_scan_reset — reset the readout cursor of a multi-size image</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">void <b class="fsfunc">lqr_carver_scan_reset</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2303"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_scan_reset</code> resets the readout pointer associated with the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> to the start of the image. (Normally, calling this function isn't needed, as the pointer is reset automatically whenever an operation is performed or once a readout has completed.) </p></div><div class="refsect1"><a name="idm2309"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-scan.html" title="lqr_carver_scan"><span class="refentrytitle"><code class="function">lqr_carver_scan</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-scan-by-row.html" title="lqr_carver_scan_by_row"><span class="refentrytitle"><code class="function">lqr_carver_scan_by_row</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-scan-line.html" title="lqr_carver_scan_line"><span class="refentrytitle"><code class="function">lqr_carver_scan_line</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-lqr-carver-cancel.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-scan.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_cancel</code>�</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_scan</code></td></tr></table></div></body></html> ref-lqr-vmap-get-orientation.html 0000644 00000010112 15034750062 0013046 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_vmap_get_orientation</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-vmaps.html" title="Visibiliy maps"><link rel="prev" href="ref-lqr-vmap-get-height.html" title="lqr_vmap_get_height"><link rel="next" href="ref-lqr-vmap-dump.html" title="lqr_vmap_dump"></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_vmap_get_orientation</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-vmap-get-height.html">Prev</a>�</td><th width="60%" align="center">Visibiliy maps</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-vmap-dump.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-vmap-get-orientation"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_vmap_get_orientation — get the orientation of an <code class="classname">LqrVMap</code> object</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">gint <b class="fsfunc">lqr_vmap_get_orientation</b>(</code></td><td>LqrVMap* <var class="pdparam">vmap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3885"></a><h2>Description</h2><p> The function <code class="function">lqr_vmap_get_orientation</code> returns the orientation of the <code class="classname">LqrVMap</code> object pointed to by <em class="parameter"><code>vmap</code></em>, which is <code class="literal">0</code> for horizontally oriented maps, <code class="literal">1</code> for vertically oriented ones. </p><p> See the <code class="classname">LqrVMap</code> objects format description in the page for <a class="link" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"><code class="classname">LqrVMap</code> constructor and destructor</a>. </p></div><div class="refsect1"><a name="idm3897"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"><span class="refentrytitle"><code class="function">lqr_vmap_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-data.html" title="lqr_vmap_get_data"><span class="refentrytitle"><code class="function">lqr_vmap_get_data</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-depth.html" title="lqr_vmap_get_depth"><span class="refentrytitle"><code class="function">lqr_vmap_get_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-width.html" title="lqr_vmap_get_width"><span class="refentrytitle"><code class="function">lqr_vmap_get_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-height.html" title="lqr_vmap_get_height"><span class="refentrytitle"><code class="function">lqr_vmap_get_height</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-lqr-vmap-get-height.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-vmaps.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-vmap-dump.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_vmap_get_height</code>�</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_vmap_dump</code></td></tr></table></div></body></html> about-this-doc.html 0000644 00000005451 15034750062 0010263 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About this document</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="Introduction.html" title="Chapter�1.�Introduction"><link rel="prev" href="Introduction.html" title="Chapter�1.�Introduction"><link rel="next" href="seam-carve.html" title="Seam carving in brief"></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">About this document</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="Introduction.html">Prev</a>�</td><th width="60%" align="center">Chapter�1.�Introduction</th><td width="20%" align="right">�<a accesskey="n" href="seam-carve.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="about-this-doc"></a>About this document</h2></div></div></div><p> This manual describes in detail the Liquid Rescale library API, starting from a brief overview on seam carving, the internal image representation, a minimal list of basic methods and the full explanation of all the library public methods. </p><p> In the `<code class="filename">examples</code>' directory, you will find a minimal example program, which only uses basic methods, and a full-featured demo program, which uses almost all of the methods described in this document. Both programs are fully commented, see also the <code class="filename">README</code> file in the `<code class="filename">examples</code>' directory. </p><p> Refer to the <code class="filename">README</code> file for information about installing and compiling. </p><p> The latest version of the Liquid Rescale library and of this manual can be found at <a class="ulink" href="http://liblqr.wikidot.com" target="_top">http://liblqr.wikidot.com</a>. </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Introduction.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="Introduction.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="seam-carve.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter�1.�Introduction�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Seam carving in brief</td></tr></table></div></body></html> references.html 0000644 00000004174 15034750062 0007563 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�4.�References</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="index.html" title="The Liquid Rescale library Manual"><link rel="prev" href="ref-lqr-progress-set-end-height-message.html" title="lqr_progress_set_end_height_message"><link rel="next" href="app-new.html" title="Appendix�A.�API changes in new versions of the library"></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">Chapter�4.�References</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-progress-set-end-height-message.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="app-new.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="references"></a>Chapter�4.�References</h1></div></div></div><p> The library implements the algorithm described in the paper "Seam Carving for Content-Aware Image Resizing" by Shai Avidan and Ariel Shamir, which can be found at <a class="ulink" href="http://www.faculty.idc.ac.il/arik/imret.pdf" target="_top">http://www.faculty.idc.ac.il/arik/imret.pdf</a> </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref-lqr-progress-set-end-height-message.html">Prev</a>�</td><td width="20%" align="center">�</td><td width="40%" align="right">�<a accesskey="n" href="app-new.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_progress_set_end_height_message</code>�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Appendix�A.�API changes in new versions of the library</td></tr></table></div></body></html> ref-lqr-carver-set-preserve-input-image.html 0000644 00000012115 15034750062 0015123 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_set_preserve_input_image</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><link rel="next" href="ref-lqr-carver-set-use-cache.html" title="lqr_carver_set_use_cache"></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_set_preserve_input_image</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-set-progress.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-use-cache.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-set-preserve-input-image"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_set_preserve_input_image — set a flag to preserve the buffer passed to a <code class="classname">LqrCarver</code> object upon creation</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">void <b class="fsfunc">lqr_carver_set_preserve_input_image</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3263"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_set_preserve_input_image</code> flags the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> so that it does not alter in any way the buffer which is passed to it by the constructor. It must be used before any resizing-related operation takes place, either after the <em class="parameter"><code>carver</code></em> construction or after the calls to <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> or <a class="xref" href="ref-lqr-vmap-load.html" title="lqr_vmap_load"><span class="refentrytitle"><code class="function">lqr_vmap_load</code></span>(3)</a>. </p></div><div class="refsect1"><a name="idm3272"></a><h2>See also</h2><p> <span class="simplelist"><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-vmap-load.html" title="lqr_vmap_load"><span class="refentrytitle"><code class="function">lqr_vmap_load</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_set_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-resize-order.html" title="lqr_carver_set_resize_order"><span class="refentrytitle"><code class="function">lqr_carver_set_resize_order</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><span class="refentrytitle"><code class="function">lqr_carver_set_dump_vmaps</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-side-switch-frequency.html" title="lqr_carver_set_side_switch_frequency"><span class="refentrytitle"><code class="function">lqr_carver_set_side_switch_frequency</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-use-cache.html" title="lqr_carver_set_use_cache"><span class="refentrytitle"><code class="function">lqr_carver_set_use_cache</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-lqr-carver-set-progress.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-set-use-cache.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_set_progress</code>�</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_set_use_cache</code></td></tr></table></div></body></html> ref-lqr-progress-new.html 0000644 00000014315 15034750062 0011441 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_progress_new</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-progress.html" title="Progress reports"><link rel="prev" href="ref-progress.html" title="Progress reports"><link rel="next" href="ref-lqr-progress-set-init.html" title="lqr_progress_set_init"></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_progress_new</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-progress.html">Prev</a>�</td><th width="60%" align="center">Progress reports</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-init.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-progress-new"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_progress_new — the <code class="classname">LqrProgress</code> object constructor</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">LqrProgress* <b class="fsfunc">lqr_progress_new</b>(</code></td><td><code>void)</code>;</td><td>�</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm5157"></a><h2>Description</h2><p> The function <code class="function">lqr_progress_new</code> is the constructor for <code class="classname">LqrProgress</code> objects. It can be used to setup a progress report indicator for rescale operations performed through <a class="xref" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a>. </p><p> Newly created <code class="classname">LqrProgress</code> objects are inactive, and need to be set up using the functions <a class="xref" href="ref-lqr-progress-set-init.html" title="lqr_progress_set_init"><span class="refentrytitle"><code class="function">lqr_progress_set_init</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update.html" title="lqr_progress_set_update"><span class="refentrytitle"><code class="function">lqr_progress_set_update</code></span>(3)</a> and <a class="xref" href="ref-lqr-progress-set-end.html" title="lqr_progress_set_end"><span class="refentrytitle"><code class="function">lqr_progress_set_end</code></span>(3)</a>. </p><p> <code class="classname">LqrProgress</code> objects are associated to <code class="classname">LqrCarver</code> objects using the function <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</code></span>(3)</a> </p></div><div class="refsect1"><a name="idm5172"></a><h2>Return value</h2><p> The function returns the newly created <code class="classname">LqrProgress</code> if successful, or <code class="literal"><span class="returnvalue">NULL</span></code> in case of insufficient memory. </p></div><div class="refsect1"><a name="idm5178"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-progress-set-init.html" title="lqr_progress_set_init"><span class="refentrytitle"><code class="function">lqr_progress_set_init</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update.html" title="lqr_progress_set_update"><span class="refentrytitle"><code class="function">lqr_progress_set_update</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end.html" title="lqr_progress_set_end"><span class="refentrytitle"><code class="function">lqr_progress_set_end</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init-width-message.html" title="lqr_progress_set_init_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_width_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init-height-message.html" title="lqr_progress_set_init_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_height_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end-width-message.html" title="lqr_progress_set_end_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_width_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end-height-message.html" title="lqr_progress_set_end_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_height_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update-step.html" title="lqr_progress_set_update_step"><span class="refentrytitle"><code class="function">lqr_progress_set_update_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</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-progress.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-progress.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-init.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Progress reports�</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_progress_set_init</code></td></tr></table></div></body></html> api-manual.html 0000644 00000025172 15034750062 0007467 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�2.�LqR library API user manual</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="index.html" title="The Liquid Rescale library Manual"><link rel="prev" href="basic.html" title="Basic methods"><link rel="next" href="generate-multi-size.html" title="Generating the multi-size image"></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">Chapter�2.�LqR library API user manual</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="basic.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="generate-multi-size.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="api-manual"></a>Chapter�2.�LqR library API user manual</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect1"><a href="api-manual.html#signals">Signal handling</a></span></dt><dt><span class="sect1"><a href="generate-multi-size.html">Generating the multi-size image</a></span></dt><dd><dl><dt><span class="sect2"><a href="generate-multi-size.html#carver-new">Carver object creation</a></span></dt><dt><span class="sect2"><a href="generate-multi-size.html#carver-init">Carver activation</a></span></dt><dt><span class="sect2"><a href="generate-multi-size.html#image-type">Choosing the image type</a></span></dt></dl></dd><dt><span class="sect1"><a href="lqr.html">Liquid rescaling</a></span></dt><dd><dl><dt><span class="sect2"><a href="lqr.html#lqr-resize">The resizing method</a></span></dt><dt><span class="sect2"><a href="lqr.html#flatten">Flattening</a></span></dt><dt><span class="sect2"><a href="lqr.html#lqr-cancel">Cancelling an action</a></span></dt></dl></dd><dt><span class="sect1"><a href="read-out.html">Reading the multi-size image</a></span></dt><dd><dl><dt><span class="sect2"><a href="read-out.html#px-by-px">Pixel by pixel</a></span></dt><dt><span class="sect2"><a href="read-out.html#line-by-line">One line at a time</a></span></dt><dt><span class="sect2"><a href="read-out.html#reset">Resetting</a></span></dt></dl></dd><dt><span class="sect1"><a href="energy.html">Automatic feature detection</a></span></dt><dd><dl><dt><span class="sect2"><a href="energy.html#energy-foreword">Foreword</a></span></dt><dt><span class="sect2"><a href="energy.html#energy-builtin">Builtin energy functions</a></span></dt><dt><span class="sect2"><a href="energy.html#energy-custom">Custom energy functions</a></span></dt><dt><span class="sect2"><a href="energy.html#energy-readout">Reading out the energy</a></span></dt></dl></dd><dt><span class="sect1"><a href="bias.html">Adding a bias</a></span></dt><dd><dl><dt><span class="sect2"><a href="bias.html#bias-foreword">Foreword</a></span></dt><dt><span class="sect2"><a href="bias.html#bias-xy">Adding a bias pixel by pixel</a></span></dt><dt><span class="sect2"><a href="bias.html#bias-float">Using an array of floating-point values</a></span></dt><dt><span class="sect2"><a href="bias.html#bias-rgb">Using another image</a></span></dt><dt><span class="sect2"><a href="bias.html#bias-areas">Operating on a specific area</a></span></dt></dl></dd><dt><span class="sect1"><a href="rigmask.html">Adding a rigidity mask</a></span></dt><dd><dl><dt><span class="sect2"><a href="rigmask.html#rigmask-foreword">Foreword</a></span></dt><dt><span class="sect2"><a href="rigmask.html#rigmask-xy">Adding an individual rigidity coefficient to a pixel</a></span></dt><dt><span class="sect2"><a href="rigmask.html#rigmask-float">Using an array of floating-point values</a></span></dt><dt><span class="sect2"><a href="rigmask.html#rigmask-rgb">Using another image</a></span></dt><dt><span class="sect2"><a href="rigmask.html#rigmask-areas">Operating on a specific area</a></span></dt></dl></dd><dt><span class="sect1"><a href="tuning.html">Tuning</a></span></dt><dd><dl><dt><span class="sect2"><a href="tuning.html#lqr-enl-step">Setting the enlargement step</a></span></dt><dt><span class="sect2"><a href="tuning.html#res-order">Choosing the resize order</a></span></dt><dt><span class="sect2"><a href="tuning.html#switch-freq">Choosing the side switch frequency</a></span></dt><dt><span class="sect2"><a href="tuning.html#cache">Using the cache</a></span></dt></dl></dd><dt><span class="sect1"><a href="vmaps.html">Dealing with the visibility maps (the seams)</a></span></dt><dd><dl><dt><span class="sect2"><a href="vmaps.html#vmap-dump">Dumping the visibility map</a></span></dt><dt><span class="sect2"><a href="vmaps.html#activate-dump">Storing the visibility maps</a></span></dt><dt><span class="sect2"><a href="vmaps.html#access-vmap">Accessing the internally attached visibility maps</a></span></dt><dt><span class="sect2"><a href="vmaps.html#vmaps-objs">The visibility map objects</a></span></dt><dt><span class="sect2"><a href="vmaps.html#import-vmap">Importing a visibility map in a carver</a></span></dt><dt><span class="sect2"><a href="vmaps.html#save-load-vmaps">Saving and loading visibility maps to/from files</a></span></dt></dl></dd><dt><span class="sect1"><a href="attach-images.html">Attaching extra images</a></span></dt><dd><dl><dt><span class="sect2"><a href="attach-images.html#attach-carver">Attaching a carver</a></span></dt><dt><span class="sect2"><a href="attach-images.html#access-attached">Accessing attached carvers</a></span></dt></dl></dd><dt><span class="sect1"><a href="progress.html">Progress indicators</a></span></dt><dd><dl><dt><span class="sect2"><a href="progress.html#progress-init">Creating and attaching a progress report object</a></span></dt><dt><span class="sect2"><a href="progress.html#progress-set-up">Setting up progress hooks</a></span></dt><dt><span class="sect2"><a href="progress.html#progress-messages">Initial and ending progress messages</a></span></dt><dt><span class="sect2"><a href="progress.html#progress-upd-step">Progress update step</a></span></dt></dl></dd><dt><span class="sect1"><a href="release.html">Releasing the memory</a></span></dt></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="signals"></a>Signal handling</h2></div></div></div><p> Many library functions return a value of type <code class="classname">LqrRetVal</code>. This is an enum type which can hold the values: </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal"><span class="errorcode">LQR_OK</span></code></span></dt><dd><p> everyting OK </p></dd><dt><span class="term"><code class="literal"><span class="errorcode">LQR_ERROR</span></code></span></dt><dd><p> generic <span class="errortype">fatal</span> error </p></dd><dt><span class="term"><code class="literal"><span class="errorcode">LQR_NOMEM</span></code></span></dt><dd><p> not enough memory </p></dd><dt><span class="term"><code class="literal"><span class="errorcode">LQR_USRCANCEL</span></code></span></dt><dd><p> action cancelled by the user </p></dd></dl></div><p> </p><p> At top level, it is important that the user handle these values explicitly, because the library functions don't do anything else than stopping and returning an error signal in case of errors. An easy way is setting up some macros and wrap each function call with those, as shown in the example files. </p><p> Below top level, the library provides some convenient macros which can be used to wrap function calls, in order to propagate these signals: </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal"><code class="function">LQR_CATCH</code> (<em class="parameter"><code>expr</code></em>)</code></span></dt><dd><p> if <em class="parameter"><code>expr</code></em> is equal to <code class="literal"><span class="errorcode">LQR_OK</span></code> it does nothing, otherwise it returns <em class="parameter"><code>expr</code></em> (or the result of the execution of <em class="parameter"><code>expr</code></em> if it happens to be a function) </p></dd><dt><span class="term"><code class="literal"><code class="function">LQR_CATCH_F</code> (<em class="parameter"><code>expr</code></em>)</code></span></dt><dd><p> returns <code class="literal"><span class="errorcode">LQR_ERROR</span></code> if <em class="parameter"><code>expr</code></em> is <code class="literal">FALSE</code> </p></dd><dt><span class="term"><code class="literal"><code class="function">LQR_CATCH_MEM</code> (<em class="parameter"><code>expr</code></em>)</code></span></dt><dd><p> returns <code class="literal"><span class="errorcode">LQR_NOMEM</span></code> if <em class="parameter"><code>expr</code></em> is <code class="literal">NULL</code> </p></dd></dl></div><p> </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> The names of these macros have changed since version <code class="literal">0.4</code>; the previous names <code class="function">CATCH</code>, <code class="function">CATCH_F</code> and <code class="function">CATCH_MEM</code> are still available, but they can be disabled at configure time if they cause conflicts (<span class="command"><strong>configure --help</strong></span> for details). </p></div><p> </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="basic.html">Prev</a>�</td><td width="20%" align="center">�</td><td width="40%" align="right">�<a accesskey="n" href="generate-multi-size.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Basic methods�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Generating the multi-size image</td></tr></table></div></body></html> ref-lqr-carver-set-image-type.html 0000644 00000011451 15034750062 0013116 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_set_image_type</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-init.html" title="lqr_carver_init"><link rel="next" href="ref-lqr-carver-set-alpha-channel.html" title="lqr_carver_set_alpha_channel"></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_set_image_type</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-init.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-alpha-channel.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-set-image-type"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_set_image_type — sets the image type of an <code class="classname">LqrCarver</code> object</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">LqrRetVal <b class="fsfunc">lqr_carver_set_image_type</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>LqrImageType <var class="pdparam">image_type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm1995"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_set_image_type</code> sets the image type of the <code class="classname">LqrCarver</code> pointed to by <em class="parameter"><code>carver</code></em> to <em class="parameter"><code>image_type</code></em>. </p><p> If <em class="parameter"><code>image_type</code></em> is equal to <code class="literal">LQR_CUSTOM_IMAGE</code>, it is assumed that there are no alpha or black channels. You can set those independently using <a class="xref" href="ref-lqr-carver-set-alpha-channel.html" title="lqr_carver_set_alpha_channel"><span class="refentrytitle"><code class="function">lqr_carver_set_alpha_channel</code></span>(3)</a> and <a class="xref" href="ref-lqr-carver-set-black-channel.html" title="lqr_carver_set_black_channel"><span class="refentrytitle"><code class="function">lqr_carver_set_black_channel</code></span>(3)</a>. </p></div><div class="refsect1"><a name="idm2007"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm2010"></a><h2>See also</h2><p> <span class="simplelist"><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-new.html" title="lqr_carver_new"><span class="refentrytitle"><code class="function">lqr_carver_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-alpha-channel.html" title="lqr_carver_set_alpha_channel"><span class="refentrytitle"><code class="function">lqr_carver_set_alpha_channel</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-black-channel.html" title="lqr_carver_set_black_channel"><span class="refentrytitle"><code class="function">lqr_carver_set_black_channel</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-image-type.html" title="lqr_carver_get_image_type"><span class="refentrytitle"><code class="function">lqr_carver_get_image_type</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-lqr-carver-init.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-set-alpha-channel.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_init</code>�</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_set_alpha_channel</code></td></tr></table></div></body></html> ref-lqr-carver-get-orientation.html 0000644 00000011676 15034750062 0013405 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_get_orientation</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"><link rel="next" href="ref-lqr-carver-get-depth.html" title="lqr_carver_get_depth"></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_get_orientation</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-get-enl-step.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-get-depth.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-get-orientation"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_get_orientation — get the orientation of a <code class="classname">LqrCarver</code> object</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">gint <b class="fsfunc">lqr_carver_get_orientation</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2888"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_get_orientation</code> returns the current orientation of the visibility map internal to the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>, which is <code class="literal">0</code> if the last rescale operation has been in the horizontal direction, <code class="literal">1</code> if it has been in the vertical direction. </p></div><div class="refsect1"><a name="idm2896"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-get-width.html" title="lqr_carver_get_width"><span class="refentrytitle"><code class="function">lqr_carver_get_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-height.html" title="lqr_carver_get_height"><span class="refentrytitle"><code class="function">lqr_carver_get_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-width.html" title="lqr_carver_get_ref_width"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-height.html" title="lqr_carver_get_ref_height"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-channels.html" title="lqr_carver_get_channels"><span class="refentrytitle"><code class="function">lqr_carver_get_channels</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-col-depth.html" title="lqr_carver_get_col_depth"><span class="refentrytitle"><code class="function">lqr_carver_get_col_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_set_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_get_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-orientation.html" title="lqr_vmap_get_orientation"><span class="refentrytitle"><code class="function">lqr_vmap_get_orientation</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-lqr-carver-get-enl-step.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-get-depth.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_get_enl_step</code>�</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_get_depth</code></td></tr></table></div></body></html> ref-lqr-carver-get-col-depth.html 0000644 00000010534 15034750062 0012721 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_get_col_depth</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-get-channels.html" title="lqr_carver_get_channels"><link rel="next" href="ref-lqr-carver-get-image-type.html" title="lqr_carver_get_image_type"></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_get_col_depth</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-get-channels.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-get-image-type.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-get-col-depth"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_get_col_depth — get the colour depth of a <code class="classname">LqrCarver</code> object</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">LqrColDepth <b class="fsfunc">lqr_carver_get_col_depth</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2751"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_get_col_depth</code> returns the colour depth of the image contained in the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>. </p></div><div class="refsect1"><a name="idm2757"></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-carver-get-width.html" title="lqr_carver_get_width"><span class="refentrytitle"><code class="function">lqr_carver_get_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-height.html" title="lqr_carver_get_height"><span class="refentrytitle"><code class="function">lqr_carver_get_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-width.html" title="lqr_carver_get_ref_width"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-height.html" title="lqr_carver_get_ref_height"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-channels.html" title="lqr_carver_get_channels"><span class="refentrytitle"><code class="function">lqr_carver_get_channels</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_get_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-orientation.html" title="lqr_carver_get_orientation"><span class="refentrytitle"><code class="function">lqr_carver_get_orientation</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-lqr-carver-get-channels.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-get-image-type.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_get_channels</code>�</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_get_image_type</code></td></tr></table></div></body></html> app-new.html 0000644 00000013742 15034750062 0007012 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Appendix�A.�API changes in new versions of the library</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="index.html" title="The Liquid Rescale library Manual"><link rel="prev" href="references.html" title="Chapter�4.�References"><link rel="next" href="app-new-0-3.html" title="New symbols in version 0.3"></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">Appendix�A.�API changes in new versions of the library</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="references.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="app-new-0-3.html">Next</a></td></tr></table><hr></div><div class="appendix"><div class="titlepage"><div><div><h1 class="title"><a name="app-new"></a>Appendix�A.�API changes in new versions of the library</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect1"><a href="app-new.html#app-new-0-4">New symbols in version 0.4</a></span></dt><dt><span class="sect1"><a href="app-new-0-3.html">New symbols in version 0.3</a></span></dt><dt><span class="sect1"><a href="app-new-0-2.html">New symbols in version 0.2</a></span></dt><dt><span class="sect1"><a href="app-deprecated.html">Deprecated symbols</a></span></dt></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="app-new-0-4"></a>New symbols in version 0.4</h2></div></div></div><p> </p><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="link" href="ref-lqr-image-type.html" title="LqrImageType"><span class="type">LqrImageType</span></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-set-image-type.html" title="lqr_carver_set_image_type"><code class="function">lqr_carver_set_image_type</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-get-image-type.html" title="lqr_carver_get_image_type"><code class="function">lqr_carver_get_image_type</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-set-alpha-channel.html" title="lqr_carver_set_alpha_channel"><code class="function">lqr_carver_set_alpha_channel</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-set-black-channel.html" title="lqr_carver_set_black_channel"><code class="function">lqr_carver_set_black_channel</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-set-preserve-input-image.html" title="lqr_carver_set_preserve_input_image"><code class="function">lqr_carver_set_preserve_input_image</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-set-use-cache.html" title="lqr_carver_set_use_cache"><code class="function">lqr_carver_set_use_cache</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-list-foreach.html" title="lqr_carver_list_foreach"><code class="function">lqr_carver_list_foreach_recursive</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-set-energy-function-builtin.html" title="lqr_carver_set_energy_function_builtin"><code class="function">lqr_carver_set_energy_function_builtin</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-set-energy-function.html" title="lqr_carver_set_energy_function"><code class="function">lqr_carver_set_energy_function</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-get-energy.html" title="lqr_carver_get_energy"><code class="function">lqr_carver_get_energy</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-get-energy.html" title="lqr_carver_get_energy"><code class="function">lqr_carver_get_true_energy</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-get-energy.html" title="lqr_carver_get_energy"><code class="function">lqr_carver_get_energy_image</code></a></td></tr><tr><td><a class="link" href="ref-lqr-rwindow-read.html" title="lqr_rwindow_read"><code class="function">lqr_rwindow_read</code></a></td></tr><tr><td><a class="link" href="ref-lqr-rwindow-get-read-t.html" title="lqr_rwindow_get_read_t"><code class="function">lqr_rwindow_get_read_t</code></a></td></tr><tr><td><a class="link" href="ref-lqr-rwindow-get-radius.html" title="lqr_rwindow_get_radius"><code class="function">lqr_rwindow_get_radius</code></a></td></tr><tr><td><a class="link" href="ref-lqr-rwindow-get-channels.html" title="lqr_rwindow_get_channels"><code class="function">lqr_rwindow_get_channels</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-bias-add.html" title="lqr_carver_bias_add"><code class="function">lqr_carver_bias_add_xy</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-bias-clear.html" title="lqr_carver_bias_clear"><code class="function">lqr_carver_bias_clear</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-rigmask-add.html" title="lqr_carver_rigmask_add"><code class="function">lqr_carver_rigmask_add_xy</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-rigmask-clear.html" title="lqr_carver_rigmask_clear"><code class="function">lqr_carver_rigmask_clear</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-cancel.html" title="lqr_carver_cancel"><code class="function">lqr_carver_cancel</code></a></td></tr></table><p> </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="references.html">Prev</a>�</td><td width="20%" align="center">�</td><td width="40%" align="right">�<a accesskey="n" href="app-new-0-3.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter�4.�References�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�New symbols in version 0.3</td></tr></table></div></body></html> lqr.html 0000644 00000021415 15034750062 0006235 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Liquid rescaling</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="api-manual.html" title="Chapter�2.�LqR library API user manual"><link rel="prev" href="generate-multi-size.html" title="Generating the multi-size image"><link rel="next" href="read-out.html" title="Reading the multi-size image"></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">Liquid rescaling</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="generate-multi-size.html">Prev</a>�</td><th width="60%" align="center">Chapter�2.�LqR library API user manual</th><td width="20%" align="right">�<a accesskey="n" href="read-out.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="lqr"></a>Liquid rescaling</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="lqr.html#lqr-resize">The resizing method</a></span></dt><dt><span class="sect2"><a href="lqr.html#flatten">Flattening</a></span></dt><dt><span class="sect2"><a href="lqr.html#lqr-cancel">Cancelling an action</a></span></dt></dl></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="lqr-resize"></a>The resizing method</h3></div></div></div><p> Once initialised, or if a visibility map has been loaded, the image can be resized through this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_resize</b>(</code></td><td> LqrCarver * <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td> gint <var class="pdparam">new_width</var>, </td></tr><tr><td>�</td><td> gint <var class="pdparam">new_height</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> This function decides automatically whether it can use the already computed visibility map, it has to update it or waste it completely and start afresh. This last event occurs when the map was computed for horizontal resizing and a vertical resize has been requested, or vice versa, and also when the required enlargment is bigger than the enlargement step value (see <a class="link" href="tuning.html#lqr-enl-step" title="Setting the enlargement step">Setting the enlargement step</a>). Note that only initialised carvers can update or change the visibility map; if this is not the case, an error is returned. </p><p> The function also takes advantage of the fact that the enlargment process mirrors the shrink process. For example, if the original size of the image is <code class="literal">(<span class="symbol">w0</span>, <span class="symbol">h0</span>)</code> and <code class="function">lqr_carver_resize</code> is invoked with <code class="literal">(<span class="symbol">w0</span> - 100, <span class="symbol">h0</span>)</code> as an argument, then subsequent calls to the function will allow on-the-fly resizing in the whole range from <code class="literal">(<span class="symbol">w0</span> - 100, <span class="symbol">h0</span>)</code> to <code class="literal">(<span class="symbol">w0</span> + 100, <span class="symbol">h0</span>)</code>. (But note that this may be overcome if <code class="literal"><span class="symbol">w0</span> + 100</code> is bigger than the enlargement step.) </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="flatten"></a>Flattening</h3></div></div></div><p> In order to resize in more than one step, the image can be flattened in its current state, thrugh this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">gboolean <b class="fsfunc">lqr_carver_flatten</b>(</code></td><td> LqrCarver * <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> The return value is <code class="literal"><span class="returnvalue">FALSE</span></code> in case of insufficient memory, <code class="literal"><span class="returnvalue">TRUE</span></code> otherwise. </p><p> This function destroys the current visibility map and reinitialises the multi-size image from its current state. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> Every time that the image is flattened (including when changing the resize direction) the original image and all information about it is lost. </p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="lqr-cancel"></a>Cancelling an action</h3></div></div></div><p> The resizing and flattening operations can be aborted using this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_cancel</b>(</code></td><td> LqrCarver * <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> This function can be invoked asynchronously, from a different thread with respect to the one in which the resizing or flattening methods were called. If successful, this function will return <code class="literal"><span class="errorcode">LQR_OK</span></code>, and any ongoing resizing or flattening functions will immidiately abort and return the special value <code class="literal"><span class="errorcode">LQR_USRCANCEL</span></code>; however, this function will have no effect if no operation was in progress when calling it. </p><p> This function can be called multiple times. </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p> Whenever a function returns <code class="literal"><span class="errorcode">LQR_USRCANCEL</span></code>, it means that the <code class="classname">LqrCarver</code> object is in an inconsistent state, and there is currently no way to recover from this situation. Therefore, any further operation on it must be avoided, and it must be destroyed. </p></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p> The functions <code class="function">lqr_carver_resize</code> and <code class="function">lqr_carver_flatten</code> are not the only ones which can return <code class="literal"><span class="errorcode">LQR_USRCANCEL</span></code>; instead, any function in the library whose return type is <code class="classname">LqrRetVal</code> and which operates on <code class="classname">LqrCarver</code> objects can return such value: for example, any function will do so if called over a <code class="classname">LqrCarver</code> object for which an operation was actually cancelled (but this is not the only possibility). </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="generate-multi-size.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="api-manual.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="read-out.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Generating the multi-size image�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Reading the multi-size image</td></tr></table></div></body></html> ref-pages.html 0000644 00000006126 15034750062 0007312 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�3.�LqR library API reference</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="index.html" title="The Liquid Rescale library Manual"><link rel="prev" href="release.html" title="Releasing the memory"><link rel="next" href="ref-lqr-ret-val.html" title="LqrRetVal"></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">Chapter�3.�LqR library API reference</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="release.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-ret-val.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="ref-pages"></a>Chapter�3.�LqR library API reference</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect1"><a href="ref-pages.html#ref-const">Types defined by the library</a></span></dt><dt><span class="sect1"><a href="ref-carve.html">Carver objects</a></span></dt><dt><span class="sect1"><a href="ref-vmaps.html">Visibiliy maps</a></span></dt><dt><span class="sect1"><a href="ref-energy.html">Energy</a></span></dt><dt><span class="sect1"><a href="ref-bias.html">Bias</a></span></dt><dt><span class="sect1"><a href="ref-rigmask.html">Rigidity masks</a></span></dt><dt><span class="sect1"><a href="ref-progress.html">Progress reports</a></span></dt></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ref-const"></a>Types defined by the library</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="ref-lqr-ret-val.html"><span class="type">LqrRetVal</span></a></span><span class="refpurpose"> — the return value of many Liquid Rescale library functions</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-col-depth.html"><span class="type">LqrColDepth</span></a></span><span class="refpurpose"> — carver objects colour depth specification</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-image-type.html"><span class="type">LqrImageType</span></a></span><span class="refpurpose"> — carver objects image type (colour model) specification</span></dt></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="release.html">Prev</a>�</td><td width="20%" align="center">�</td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-ret-val.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Releasing the memory�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�<span class="type">LqrRetVal</span></td></tr></table></div></body></html> ref-lqr-vmap-dump.html 0000644 00000006660 15034750062 0010720 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_vmap_dump</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-vmaps.html" title="Visibiliy maps"><link rel="prev" href="ref-lqr-vmap-get-orientation.html" title="lqr_vmap_get_orientation"><link rel="next" href="ref-lqr-vmap-internal-dump.html" title="lqr_vmap_internal_dump"></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_vmap_dump</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-vmap-get-orientation.html">Prev</a>�</td><th width="60%" align="center">Visibiliy maps</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-vmap-internal-dump.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-vmap-dump"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_vmap_dump — dump an <code class="classname">LqrVMap</code> object</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">LqrVMap* <b class="fsfunc">lqr_vmap_dump</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3928"></a><h2>Description</h2><p> The function <code class="function">lqr_vmap_dump</code> returns the current visibility map of the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>, or <code class="literal"><span class="returnvalue">NULL</span></code> in case of errors. </p></div><div class="refsect1"><a name="idm3936"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-vmap-internal-dump.html" title="lqr_vmap_internal_dump"><span class="refentrytitle"><code class="function">lqr_vmap_internal_dump</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-load.html" title="lqr_vmap_load"><span class="refentrytitle"><code class="function">lqr_vmap_load</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><span class="refentrytitle"><code class="function">lqr_carver_set_dump_vmaps</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-lqr-vmap-get-orientation.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-vmaps.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-vmap-internal-dump.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_vmap_get_orientation</code>�</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_vmap_internal_dump</code></td></tr></table></div></body></html> ref-lqr-carver-scan.html 0000644 00000014721 15034750062 0011213 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_scan</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-scan-reset.html" title="lqr_carver_scan_reset"><link rel="next" href="ref-lqr-carver-scan-by-row.html" title="lqr_carver_scan_by_row"></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_scan</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-scan-reset.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-scan-by-row.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-scan"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_scan, lqr_carver_scan_ext — read out a multi-size image one pixel at a time</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">gboolean <b class="fsfunc">lqr_carver_scan</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gint* <var class="pdparam">x</var>, </td></tr><tr><td>�</td><td>gint* <var class="pdparam">y</var>, </td></tr><tr><td>�</td><td>guchar** <var class="pdparam">rgb</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">gboolean <b class="fsfunc">lqr_carver_scan_ext</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gint* <var class="pdparam">x</var>, </td></tr><tr><td>�</td><td>gint* <var class="pdparam">y</var>, </td></tr><tr><td>�</td><td>void** <var class="pdparam">rgb</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2353"></a><h2>Description</h2><p> The functions <code class="function">lqr_carver_scan</code> and <code class="function">lqr_carver_scan_ext</code> are used to read out the multi-size image contained in the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> one pixel at a time. They store the pixel coordinates in the variables pointed to by <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em>, and the pixel content in the array pointed to by <em class="parameter"><code>rgb</code></em>; then they move the readout pointer to the next pixel, or they reset it if the end of the image is reached. </p><p> The first one must only be used on the <code class="classname">LqrCarver</code> objects created with <em class="parameter"><code>lqr_carver_new</code></em>, i.e. with 8-bit images, while the second one is general (see <a class="xref" href="ref-lqr-col-depth.html" title="LqrColDepth"><span class="refentrytitle"><span class="type">LqrColDepth</span></span>(3)</a>), but the <em class="parameter"><code>rgb</code></em> pointer must be cast to the appropriate type to be used (i.e pass the address of a pointer to <code class="literal">void</code> to the function <code class="function">lqr_carver_scan_ext</code>, then cast it to a pointer of the appropriate type and use this last one for reading the output). </p><p> The <em class="parameter"><code>rgb</code></em> variable will point to an array which is internal to the <code class="classname">LqrCarver</code> object, so there is no need to allocate memory for it. However, it should only be accessed right after a call to the scan functions, and writing to it must be avoided. </p></div><div class="refsect1"><a name="idm2373"></a><h2>Return value</h2><p> These functions return <code class="literal"><span class="returnvalue">TRUE</span></code> in case the readout is successful and the end of the image was not reached, <code class="literal"><span class="returnvalue">FALSE</span></code> otherwise. If <code class="function">lqr_carver_scan</code> is called over a non-8-bit <code class="classname">LqrCarver</code> object, it will return <code class="literal"><span class="returnvalue">FALSE</span></code>. </p></div><div class="refsect1"><a name="idm2384"></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-carver-scan-reset.html" title="lqr_carver_scan_reset"><span class="refentrytitle"><code class="function">lqr_carver_scan_reset</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-scan-line.html" title="lqr_carver_scan_line"><span class="refentrytitle"><code class="function">lqr_carver_scan_line</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-lqr-carver-scan-reset.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-scan-by-row.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_scan_reset</code>�</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_scan_by_row</code></td></tr></table></div></body></html> ref-progress.html 0000644 00000010321 15034750062 0010047 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Progress reports</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-pages.html" title="Chapter�3.�LqR library API reference"><link rel="prev" href="ref-lqr-carver-rigmask-clear.html" title="lqr_carver_rigmask_clear"><link rel="next" href="ref-lqr-progress-new.html" title="lqr_progress_new"></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">Progress reports</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-rigmask-clear.html">Prev</a>�</td><th width="60%" align="center">Chapter�3.�LqR library API reference</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-progress-new.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ref-progress"></a>Progress reports</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="ref-lqr-progress-new.html"><code class="function">lqr_progress_new</code></a></span><span class="refpurpose"> — the <code class="classname">LqrProgress</code> object constructor</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-progress-set-init.html"><code class="function">lqr_progress_set_init</code></a></span><span class="refpurpose"> — execude custom code before each rescaling operation</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-progress-set-update.html"><code class="function">lqr_progress_set_update</code></a></span><span class="refpurpose"> — execude custom code at regular steps during each rescaling operation</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-progress-set-end.html"><code class="function">lqr_progress_set_end</code></a></span><span class="refpurpose"> — execude custom code after each rescaling operation</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-progress-set-update-step.html"><code class="function">lqr_progress_set_update_step</code></a></span><span class="refpurpose"> — setup update step for <code class="classname">LqrProgress</code> objects</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-progress-set-init-width-message.html"><code class="function">lqr_progress_set_init_width_message</code></a></span><span class="refpurpose"> — setup width message for init hooks in <code class="classname">LqrProgress</code> objects</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-progress-set-init-height-message.html"><code class="function">lqr_progress_set_init_height_message</code></a></span><span class="refpurpose"> — setup height message for init hooks in <code class="classname">LqrProgress</code> objects</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-progress-set-end-width-message.html"><code class="function">lqr_progress_set_end_width_message</code></a></span><span class="refpurpose"> — setup width message for end hooks in <code class="classname">LqrProgress</code> objects</span></dt><dt><span class="refentrytitle"><a href="ref-lqr-progress-set-end-height-message.html"><code class="function">lqr_progress_set_end_height_message</code></a></span><span class="refpurpose"> — setup height message for end hooks in <code class="classname">LqrProgress</code> objects</span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref-lqr-carver-rigmask-clear.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-pages.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-progress-new.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_rigmask_clear</code>�</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_progress_new</code></td></tr></table></div></body></html> ref-lqr-col-depth.html 0000644 00000012222 15034750062 0010660 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>LqrColDepth</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-pages.html#ref-const" title="Types defined by the library"><link rel="prev" href="ref-lqr-ret-val.html" title="LqrRetVal"><link rel="next" href="ref-lqr-image-type.html" title="LqrImageType"></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"><span class="type">LqrColDepth</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-ret-val.html">Prev</a>�</td><th width="60%" align="center">Types defined by the library</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-image-type.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-col-depth"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>LqrColDepth — carver objects colour depth specification</p></div><div class="refsect1"><a name="idm1681"></a><h2>Description</h2><p> The default <code class="classname">LqrCarver</code> object constructor <code class="function">lqr_carver_new</code> uses a colour depth of 8 bits per channel, and therefore its input must be an array of <span class="type">unsigned char</span>s. However, the <code class="classname">LqrCarver</code> objects can handle images of grater colour depth, if they are created with the <code class="function">lqr_carver_new_ext</code> constructor. The possible colour depths are specified through variables of type <span class="type">LqrColDepth</span>, which is an enum type; its possible values, and the type of the input buffer associated with them, are: </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">LQR_COLDEPTH_8I</code></span></dt><dd><p> use type <span class="type">guchar</span> (8 bit unsigned integers) - the default </p></dd><dt><span class="term"><code class="literal">LQR_COLDEPTH_16I</code></span></dt><dd><p> use type <span class="type">guint16</span> (16 bit unsigned integers) </p></dd><dt><span class="term"><code class="literal">LQR_COLDEPTH_32F</code></span></dt><dd><p> use type <span class="type">gfloat</span> (32 bit floating point) </p></dd><dt><span class="term"><code class="literal">LQR_COLDEPTH_64F</code></span></dt><dd><p> use type <span class="type">gdouble</span> (64 bit floating point) </p></dd></dl></div><p> </p><p> These values are also relevant when reading out a <code class="classname">LqrCarver</code> object with the functions <code class="function">lqr_carver_scan_ext</code> or <code class="function">lqr_carver_scan_line_ext</code>, since the readout buffer must be cast to the appropriate type to be actually read. </p><p> The colour depth of an <code class="classname">LqrCarver</code> object can be obtained with the function <code class="function">lqr_carver_get_col_depth</code>. </p></div><div class="refsect1"><a name="idm1722"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-new.html" title="lqr_carver_new"><span class="refentrytitle"><code class="function">lqr_carver_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-col-depth.html" title="lqr_carver_get_col_depth"><span class="refentrytitle"><code class="function">lqr_carver_get_col_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-scan.html" title="lqr_carver_scan"><span class="refentrytitle"><code class="function">lqr_carver_scan</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-scan-line.html" title="lqr_carver_scan_line"><span class="refentrytitle"><code class="function">lqr_carver_scan_line</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-lqr-ret-val.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-pages.html#ref-const">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-image-type.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="type">LqrRetVal</span>�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�<span class="type">LqrImageType</span></td></tr></table></div></body></html> ref-lqr-carver-set-energy-function.html 0000644 00000024742 15034750062 0014200 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_set_energy_function</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-energy.html" title="Energy"><link rel="prev" href="ref-lqr-carver-set-energy-function-builtin.html" title="lqr_carver_set_energy_function_builtin"><link rel="next" href="ref-lqr-carver-get-energy.html" title="lqr_carver_get_energy"></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_set_energy_function</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-set-energy-function-builtin.html">Prev</a>�</td><th width="60%" align="center">Energy</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-get-energy.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-set-energy-function"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_bias_set_energy_function — set a custom energy function for a <code class="classname">LqrCarver</code> object</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">LqrRetVal <b class="fsfunc">lqr_carver_set_energy_function</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>LqrEnergyFunc <var class="pdparam">en_func</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">radius</var>, </td></tr><tr><td>�</td><td>LqrEnergyReaderType <var class="pdparam">reader_type</var>, </td></tr><tr><td>�</td><td>gpointer <var class="pdparam">extra_data</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4323"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_set_energy_function</code> assigns the energy function <em class="parameter"><code>en_func</code></em> to the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> (see below for more details on custom functions definitions). </p><p> The parameter <em class="parameter"><code>radius</code></em> determines the size of the square region which affects the computation around each pixel (the side of the square will be <code class="literal">2 * <em class="parameter"><code>radius</code></em> + 1</code> pixels long). </p><p> The parameter <em class="parameter"><code>reader_type</code></em> sets the reader type used when reading the image, and therefore it determines what quantity will be passed on to the function <em class="parameter"><code>en_func</code></em> (see below for more details on reader types). </p><p> The parameter <em class="parameter"><code>extra_data</code></em> is a (void) pointer which can be used to pass on additional values to the function <em class="parameter"><code>ef_func</code></em>. </p></div><div class="refsect1"><a name="idm4340"></a><h2>Custom functions definition</h2><p> The function <em class="parameter"><code>en_func</code></em> must be of type <code class="classname">LqrEnergyFunc</code>, whose prototype is defined by: </p><pre class="programlisting"> typedef gfloat (*LqrEnergyFunc) (gint x, gint y, gint img_width, gint img_height, LqrReadingWindow * rwindow, gpointer extra_data); </pre><p> Such a function is expected to compute the energy at pixel <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> based on the knowledge of the current image size (obtained from <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em>) and the content of the image in a square around that pixel, which is passed through the <em class="parameter"><code>rwindow</code></em> reading window. </p><p> In most cases, the parameters <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>, <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> would only be used to determine whether the region under consideration is at the image boundary or not. </p><p> The <em class="parameter"><code>rwindow</code></em> content must be read using the function <a class="xref" href="ref-lqr-rwindow-read.html" title="lqr_rwindow_read"><span class="refentrytitle"><code class="function">lqr_rwindow_read</code></span>(3)</a>. </p></div><div class="refsect1"><a name="idm4359"></a><h2>Reader types</h2><p> The <span class="type"><code class="literal">LqrEnergyReaderType</code></span> is an enum which can take these values (also noted is the number of channels of the corresponging reading window): </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">LQR_ER_BRIGHTNESS</code></span></dt><dd><p> brightness (1 channel) </p></dd><dt><span class="term"><code class="literal">LQR_ER_BRIGHTNESS</code></span></dt><dd><p> luma (1 channel) </p></dd><dt><span class="term"><code class="literal">LQR_ER_RGBA</code></span></dt><dd><p> RGBA (4 channels) </p></dd><dt><span class="term"><code class="literal">LQR_ER_CUSTOM</code></span></dt><dd><p> read the normalised image channels as they are (as many channels as the image has) </p></dd></dl></div><p> These readouts always return values beetween <code class="literal">0</code> and <code class="literal">1</code>. </p><p> Note that these readouts may have special meanings depending on the image type: </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> for <code class="literal">LQR_GREY_IMAGE</code>, <code class="literal">LQR_GREYA_IMAGE</code> and <code class="literal">LQR_CUSTOM_IMAGE</code> images, the <code class="literal">LQR_ER_LUMA</code> readout will yield the same result as <code class="literal">LQR_ER_BRIGHTNESS</code> </p></li><li class="listitem"><p> for <code class="literal">LQR_CUSTOM_IMAGE</code> images, the <code class="literal">LQR_ER_BRIGHTNESS</code> readout will return the average pixel value (additive, i.e. if a black channel is present the channel values will be inverted and multiplied by the black channel inverse), multiplied by the alpha channel value. </p></li><li class="listitem"><p> for <code class="literal">LQR_CUSTOM_IMAGE</code> images, the <code class="literal">LQR_ER_RGBA</code> readout <span class="emphasis"><em>cannot be used</em></span>: it will always return <code class="literal">0</code> </p></li></ul></div><p> </p></div><div class="refsect1"><a name="idm4406"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm4409"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-set-energy-function-builtin.html" title="lqr_carver_set_energy_function_builtin"><span class="refentrytitle"><code class="function">lqr_carver_set_energy_function_builtin</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-energy.html" title="lqr_carver_get_energy"><span class="refentrytitle"><code class="function">lqr_carver_get_energy</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-read.html" title="lqr_rwindow_read"><span class="refentrytitle"><code class="function">lqr_rwindow_read</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-read-t.html" title="lqr_rwindow_get_read_t"><span class="refentrytitle"><code class="function">lqr_rwindow_get_read_t</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-radius.html" title="lqr_rwindow_get_radius"><span class="refentrytitle"><code class="function">lqr_rwindow_get_radius</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-channels.html" title="lqr_rwindow_get_channels"><span class="refentrytitle"><code class="function">lqr_rwindow_get_channels</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-lqr-carver-set-energy-function-builtin.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-energy.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-carver-get-energy.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_set_energy_function_builtin</code>�</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_get_energy</code></td></tr></table></div></body></html> ref-lqr-carver-attach.html 0000644 00000013326 15034750062 0011533 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_attach</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-set-use-cache.html" title="lqr_carver_set_use_cache"><link rel="next" href="ref-lqr-carver-list-start.html" title="lqr_carver_list_start"></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_attach</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-set-use-cache.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-list-start.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-attach"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_attach — attach an <code class="classname">LqrCarver</code> to another <code class="classname">LqrCarver</code></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">LqrRetVal <b class="fsfunc">lqr_carver_attach</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>LqrCarver* <var class="pdparam">aux</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3354"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_attach</code> is used to attach an <code class="classname">LqrCarver</code> object (pointed to by <em class="parameter"><code>aux</code></em>) to another one (pointed to by <em class="parameter"><code>carver</code></em>). This will have the effect that each operation performed over the <em class="parameter"><code>carver</code></em> object will be reflected on <em class="parameter"><code>aux</code></em> (they will share the same visibility map). </p><p> This function must not be used after a visibility map was loaded into the base object (the one pointed to by <em class="parameter"><code>carver</code></em>). </p><p> The object pointed to by <em class="parameter"><code>aux</code></em> must have the same original size as the base object. Note that the original size information is reset whenever a flattening operation occurs, or the rescaling direction changes, so that this function should be called befor rescaling occurs. </p><p> There is no limitation on the number of <code class="classname">LqrCarver</code> objects which is possible to attach. Nesting is also possible. It is irrelevant if the <em class="parameter"><code>aux</code></em> carver is initialised or not; from the moment of attachment, it will passively undergo all transformations performed over <em class="parameter"><code>carver</code></em>. </p></div><div class="refsect1"><a name="idm3371"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. <code class="literal"><span class="errorcode">LQR_ERROR</span></code> is returned if the sizes of <em class="parameter"><code>carver</code></em> and <em class="parameter"><code>aux</code></em> don't match. </p></div><div class="refsect1"><a name="idm3378"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-start.html" title="lqr_carver_list_start"><span class="refentrytitle"><code class="function">lqr_carver_list_start</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-current.html" title="lqr_carver_list_current"><span class="refentrytitle"><code class="function">lqr_carver_list_current</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-next.html" title="lqr_carver_list_next"><span class="refentrytitle"><code class="function">lqr_carver_list_next</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-list-foreach.html" title="lqr_carver_list_foreach"><span class="refentrytitle"><code class="function">lqr_carver_list_foreach</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-lqr-carver-set-use-cache.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-list-start.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_set_use_cache</code>�</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_list_start</code></td></tr></table></div></body></html> ref-lqr-carver-get-width.html 0000644 00000010245 15034750062 0012160 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_get_width</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-scan-line.html" title="lqr_carver_scan_line"><link rel="next" href="ref-lqr-carver-get-height.html" title="lqr_carver_get_height"></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_get_width</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-scan-line.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-get-height.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-get-width"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_get_width — get the current width of a <code class="classname">LqrCarver</code> object</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">gint <b class="fsfunc">lqr_carver_get_width</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2525"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_get_width</code> returns the current width of the image contained in the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>, in pixel units. </p></div><div class="refsect1"><a name="idm2531"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-get-height.html" title="lqr_carver_get_height"><span class="refentrytitle"><code class="function">lqr_carver_get_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-width.html" title="lqr_carver_get_ref_width"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-height.html" title="lqr_carver_get_ref_height"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-channels.html" title="lqr_carver_get_channels"><span class="refentrytitle"><code class="function">lqr_carver_get_channels</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-col-depth.html" title="lqr_carver_get_col_depth"><span class="refentrytitle"><code class="function">lqr_carver_get_col_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_get_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-orientation.html" title="lqr_carver_get_orientation"><span class="refentrytitle"><code class="function">lqr_carver_get_orientation</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-lqr-carver-scan-line.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-get-height.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_scan_line</code>�</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_get_height</code></td></tr></table></div></body></html> ref-lqr-vmap-list-foreach.html 0000644 00000012100 15034750062 0012315 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_vmap_list_foreach</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-vmaps.html" title="Visibiliy maps"><link rel="prev" href="ref-lqr-vmap-list-next.html" title="lqr_vmap_list_next"><link rel="next" href="ref-energy.html" title="Energy"></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_vmap_list_foreach</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-vmap-list-next.html">Prev</a>�</td><th width="60%" align="center">Visibiliy maps</th><td width="20%" align="right">�<a accesskey="n" href="ref-energy.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-vmap-list-foreach"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_vmap_list_foreach — perform operations on all <code class="classname">LqrVMap</code> objects in an <code class="classname">LqrVMapList</code> object</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">LqrRetVal <b class="fsfunc">lqr_vmap_list_foreach</b>(</code></td><td>LqrVMapList* <var class="pdparam">list</var>, </td></tr><tr><td>�</td><td>LqrVMapFunc <var class="pdparam">func</var>, </td></tr><tr><td>�</td><td>gpointer <var class="pdparam">data</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4186"></a><h2>Description</h2><p> The function <code class="function">lqr_vmap_list_foreach</code> can be used to apply the function <em class="parameter"><code>func</code></em> to all the <code class="classname">LqrVMap</code> objects listed in <em class="parameter"><code>list</code></em>. The parameter <em class="parameter"><code>data</code></em> is used to pass arguments to the function. </p><p> The <em class="parameter"><code>list</code></em> value should be obtained through the function <a class="xref" href="ref-lqr-vmap-list-start.html" title="lqr_vmap_list_start"><span class="refentrytitle"><code class="function">lqr_vmap_list_start</code></span>(3)</a>. </p><p> The function <em class="parameter"><code>func</code></em> is of type <code class="classname">LqrVMapFunc</code>, whose prototype is defined by: </p><pre class="programlisting"> typedef LqrRetVal (*LqrVMapFunc) (LqrVMap *vmap, gpointer data); </pre><p> The <em class="parameter"><code>data</code></em> argument is of type <span class="structname">gpointer</span>, which is just a pointer to <code class="literal"><span class="type">void</span></code>. </p></div><div class="refsect1"><a name="idm4205"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-list-start.html" title="lqr_vmap_list_start"><span class="refentrytitle"><code class="function">lqr_vmap_list_start</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-list-current.html" title="lqr_vmap_list_current"><span class="refentrytitle"><code class="function">lqr_vmap_list_current</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-list-next.html" title="lqr_vmap_list_next"><span class="refentrytitle"><code class="function">lqr_vmap_list_next</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-internal-dump.html" title="lqr_vmap_internal_dump"><span class="refentrytitle"><code class="function">lqr_vmap_internal_dump</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><span class="refentrytitle"><code class="function">lqr_carver_set_dump_vmaps</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-lqr-vmap-list-next.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-vmaps.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-energy.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_vmap_list_next</code>�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Energy</td></tr></table></div></body></html> ref-lqr-vmap-get-width.html 0000644 00000007650 15034750062 0011647 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_vmap_get_width</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-vmaps.html" title="Visibiliy maps"><link rel="prev" href="ref-lqr-vmap-get-depth.html" title="lqr_vmap_get_depth"><link rel="next" href="ref-lqr-vmap-get-height.html" title="lqr_vmap_get_height"></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_vmap_get_width</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-vmap-get-depth.html">Prev</a>�</td><th width="60%" align="center">Visibiliy maps</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-vmap-get-height.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-vmap-get-width"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_vmap_get_width — get the width of an <code class="classname">LqrVMap</code> object</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">gint <b class="fsfunc">lqr_vmap_get_width</b>(</code></td><td>LqrVMap* <var class="pdparam">vmap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3803"></a><h2>Description</h2><p> The function <code class="function">lqr_vmap_get_width</code> returns the width of the <code class="classname">LqrVMap</code> object pointed to by <em class="parameter"><code>vmap</code></em>. </p><p> See the <code class="classname">LqrVMap</code> objects format description in the page for <a class="link" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"><code class="classname">LqrVMap</code> constructor and destructor</a>. </p></div><div class="refsect1"><a name="idm3813"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-vmap-new.html" title="lqr_vmap_new"><span class="refentrytitle"><code class="function">lqr_vmap_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-data.html" title="lqr_vmap_get_data"><span class="refentrytitle"><code class="function">lqr_vmap_get_data</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-depth.html" title="lqr_vmap_get_depth"><span class="refentrytitle"><code class="function">lqr_vmap_get_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-height.html" title="lqr_vmap_get_height"><span class="refentrytitle"><code class="function">lqr_vmap_get_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-vmap-get-orientation.html" title="lqr_vmap_get_orientation"><span class="refentrytitle"><code class="function">lqr_vmap_get_orientation</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-lqr-vmap-get-depth.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-vmaps.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-vmap-get-height.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_vmap_get_depth</code>�</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_vmap_get_height</code></td></tr></table></div></body></html> app-deprecated.html 0000644 00000003771 15034750062 0010322 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Deprecated symbols</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="app-new.html" title="Appendix�A.�API changes in new versions of the library"><link rel="prev" href="app-new-0-2.html" title="New symbols in version 0.2"></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">Deprecated symbols</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="app-new-0-2.html">Prev</a>�</td><th width="60%" align="center">Appendix�A.�API changes in new versions of the library</th><td width="20%" align="right">�</td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="app-deprecated"></a>Deprecated symbols</h2></div></div></div><p> </p><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="link" href="ref-lqr-carver-get-channels.html" title="lqr_carver_get_channels"><code class="function">lqr_carver_get_bpp</code></a></td></tr><tr><td><a class="link" href="ref-lqr-carver-set-gradient-function.html" title="lqr_carver_set_gradient_function"><code class="function">lqr_carver_set_gradient_function</code></a></td></tr></table><p> </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="app-new-0-2.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="app-new.html">Up</a></td><td width="40%" align="right">�</td></tr><tr><td width="40%" align="left" valign="top">New symbols in version 0.2�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�</td></tr></table></div></body></html> ref-lqr-carver-get-enl-step.html 0000644 00000011553 15034750062 0012573 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_get_enl_step</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-get-image-type.html" title="lqr_carver_get_image_type"><link rel="next" href="ref-lqr-carver-get-orientation.html" title="lqr_carver_get_orientation"></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_get_enl_step</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-get-image-type.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-get-orientation.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-get-enl-step"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_get_enl_step — get the enlargement step of a <code class="classname">LqrCarver</code> object</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">gfloat <b class="fsfunc">lqr_carver_get_enl_step</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2843"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_get_enl_step</code> returns the enlargement step of the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>, i.e. the maximum enlargement allowed in a single step for that carver, expressed as the ratio with respect to its reference width (for horizontal rescalings) or height (for vertical rescalings). The returned value is strictly greater than 1 and less than 2. </p></div><div class="refsect1"><a name="idm2849"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-get-width.html" title="lqr_carver_get_width"><span class="refentrytitle"><code class="function">lqr_carver_get_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-height.html" title="lqr_carver_get_height"><span class="refentrytitle"><code class="function">lqr_carver_get_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-width.html" title="lqr_carver_get_ref_width"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-height.html" title="lqr_carver_get_ref_height"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-channels.html" title="lqr_carver_get_channels"><span class="refentrytitle"><code class="function">lqr_carver_get_channels</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-col-depth.html" title="lqr_carver_get_col_depth"><span class="refentrytitle"><code class="function">lqr_carver_get_col_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_set_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-orientation.html" title="lqr_carver_get_orientation"><span class="refentrytitle"><code class="function">lqr_carver_get_orientation</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-lqr-carver-get-image-type.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-get-orientation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_get_image_type</code>�</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_get_orientation</code></td></tr></table></div></body></html> ref-lqr-progress-set-end-height-message.html 0000644 00000013131 15034750062 0015072 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_progress_set_end_height_message</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-progress.html" title="Progress reports"><link rel="prev" href="ref-lqr-progress-set-end-width-message.html" title="lqr_progress_set_end_width_message"><link rel="next" href="references.html" title="Chapter�4.�References"></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_progress_set_end_height_message</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-progress-set-end-width-message.html">Prev</a>�</td><th width="60%" align="center">Progress reports</th><td width="20%" align="right">�<a accesskey="n" href="references.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-progress-set-end-height-message"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_progress_set_end_height_message — setup height message for end hooks in <code class="classname">LqrProgress</code> objects</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">LqrRetVal <b class="fsfunc">lqr_progress_set_end_height_message</b>(</code></td><td>LqrProgress* <var class="pdparam">p</var>, </td></tr><tr><td>�</td><td>const guchar* <var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm5632"></a><h2>Description</h2><p> The function <code class="function">lqr_progress_set_end_height_message</code> sets the string <em class="parameter"><code>message</code></em> in the <code class="classname">LqrProgress</code> object pointed to by <em class="parameter"><code>p</code></em> as the argument when rescaling the height for end hooks set with <a class="xref" href="ref-lqr-progress-set-end.html" title="lqr_progress_set_end"><span class="refentrytitle"><code class="function">lqr_progress_set_end</code></span>(3)</a> </p><p> The default value for newly created <code class="classname">LqrProgress</code> objects is: <code class="computeroutput">"done"</code>. </p></div><div class="refsect1"><a name="idm5643"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm5646"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-progress-new.html" title="lqr_progress_new"><span class="refentrytitle"><code class="function">lqr_progress_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init.html" title="lqr_progress_set_init"><span class="refentrytitle"><code class="function">lqr_progress_set_init</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update.html" title="lqr_progress_set_update"><span class="refentrytitle"><code class="function">lqr_progress_set_update</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end.html" title="lqr_progress_set_end"><span class="refentrytitle"><code class="function">lqr_progress_set_end</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init-width-message.html" title="lqr_progress_set_init_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_width_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init-height-message.html" title="lqr_progress_set_init_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_height_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end-width-message.html" title="lqr_progress_set_end_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_width_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update-step.html" title="lqr_progress_set_update_step"><span class="refentrytitle"><code class="function">lqr_progress_set_update_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</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-lqr-progress-set-end-width-message.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-progress.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="references.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_progress_set_end_width_message</code>�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Chapter�4.�References</td></tr></table></div></body></html> energy.html 0000644 00000061550 15034750062 0006734 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Automatic feature detection</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="api-manual.html" title="Chapter�2.�LqR library API user manual"><link rel="prev" href="read-out.html" title="Reading the multi-size image"><link rel="next" href="bias.html" title="Adding a bias"></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">Automatic feature detection</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="read-out.html">Prev</a>�</td><th width="60%" align="center">Chapter�2.�LqR library API user manual</th><td width="20%" align="right">�<a accesskey="n" href="bias.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="energy"></a>Automatic feature detection</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="energy.html#energy-foreword">Foreword</a></span></dt><dt><span class="sect2"><a href="energy.html#energy-builtin">Builtin energy functions</a></span></dt><dt><span class="sect2"><a href="energy.html#energy-custom">Custom energy functions</a></span></dt><dt><span class="sect2"><a href="energy.html#energy-readout">Reading out the energy</a></span></dt></dl></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="energy-foreword"></a>Foreword</h3></div></div></div><p> The automatic feature detection relies on the evaluation of the relevance of each pixel; this quantity is called `energy': the higher the energy of a pixel, the less likely it will be that such pixel will be directly involved in the rescaling. The energy function which the library uses can be customised; normally, edge detector filters are the best choices for this purpose. </p><p> There is a unified framework in the Liquid Rescale library for energy fucntions: briefly, each energy function used by the library receives the current position and image size as parameters, and is provided access to a square of values from the image, centered around the current position. This access is provided through an object which is called a "reading window", and the image pixels are not read directly, but rather they are accessed according to a "reader type", which means that the energy function can get e.g. the brightness of a pixel without needing to care for the underlying image representation, i.e. the image type or the colour depth. </p><p> The library provides a small set of very simple (yet normally effective) gradient-based energy functions, and a customisation framework for defining more functions. </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="energy-builtin"></a>Builtin energy functions</h3></div></div></div><p> The library has some builtin functions for energy evaluation; in order to set one of the builtin functions in a <code class="classname">LqrCarver</code> object this function is used: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_set_energy_function_builtin</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>LqrEnergyFunctionBuiltinType <var class="pdparam">ef_ind</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> The currently available builtin functions which can be used as <em class="parameter"><code>ef_ind</code></em> are: </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">LQR_EF_GRAD_XABS</code></span></dt><dd><p> absolute value of the brightness gradient in the direction of the rescaling (this is the default) </p></dd><dt><span class="term"><code class="literal">LQR_EF_GRAD_SUMABS</code></span></dt><dd><p> sum of absolute values of the brightness gradients in both directions </p></dd><dt><span class="term"><code class="literal">LQR_EF_GRAD_NORM</code></span></dt><dd><p> norm of the brightness gradient </p></dd><dt><span class="term"><code class="literal">LQR_EF_LUMA_GRAD_XABS</code></span></dt><dd><p> absolute value of the luma gradient in the direction of the rescaling </p></dd><dt><span class="term"><code class="literal">LQR_EF_LUMA_GRAD_SUMABS</code></span></dt><dd><p> sum of absolute values of the luma gradients in both directions </p></dd><dt><span class="term"><code class="literal">LQR_EF_LUMA_GRAD_NORM</code></span></dt><dd><p> norm of the luma gradient </p></dd><dt><span class="term"><code class="literal">LQR_EF_NULL</code></span></dt><dd><p> null </p></dd></dl></div><p> </p><p> All of the above gradient functions have a radius of 1 pixel. </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="energy-custom"></a>Custom energy functions</h3></div></div></div><p> Custom energy functions for a <code class="classname">LqrCarver</code> object are set using this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_set_energy_function</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>LqrEnergyFunc <var class="pdparam">ef_func</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">radius</var>, </td></tr><tr><td>�</td><td>LqrEnergyReaderType <var class="pdparam">reader_type</var>, </td></tr><tr><td>�</td><td>gpointer <var class="pdparam">extra_data</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> Here, <em class="parameter"><code>ef_func</code></em> is the function (the prototype will be explained below), <em class="parameter"><code>radius</code></em> is used to set the size of the square region around each pixel which is used to evaluate the energy for that pixel, <em class="parameter"><code>reader_type</code></em> is used to set which quantity is used for the energy computation (e.g. brightness, luma etc.) and <em class="parameter"><code>extra_data</code></em> is a (void) pointer which can be used to pass additional parameters to the energy function. </p><p> The <span class="type"><code class="literal">LqrEnergyReaderType</code></span> is an enum which can take these values (also noted is the number of channels of the corresponging output): </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">LQR_ER_BRIGHTNESS</code></span></dt><dd><p> brightness (1 channel) </p></dd><dt><span class="term"><code class="literal">LQR_ER_LUMA</code></span></dt><dd><p> luma (1 channel) </p></dd><dt><span class="term"><code class="literal">LQR_ER_RGBA</code></span></dt><dd><p> RGBA (4 channels) </p></dd><dt><span class="term"><code class="literal">LQR_ER_CUSTOM</code></span></dt><dd><p> read the normalised image channels as they are (as many channels as the image has) </p></dd></dl></div><p> These readouts always return values beetween <code class="literal">0</code> and <code class="literal">1</code>. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> Note that these readouts may have special meanings depending on the image type: </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> for <code class="literal">LQR_GREY_IMAGE</code>, <code class="literal">LQR_GREYA_IMAGE</code> and <code class="literal">LQR_CUSTOM_IMAGE</code> images, the <code class="literal">LQR_ER_LUMA</code> readout will yield the same result as <code class="literal">LQR_ER_BRIGHTNESS</code> </p></li><li class="listitem"><p> for <code class="literal">LQR_CUSTOM_IMAGE</code> images, the <code class="literal">LQR_ER_BRIGHTNESS</code> readout will return the average pixel value (additive, i.e. if a black channel is present the channel values will be inverted and multiplied by the black channel inverse), multiplied by the alpha channel value. </p></li><li class="listitem"><p> for <code class="literal">LQR_CUSTOM_IMAGE</code> images, the <code class="literal">LQR_ER_RGBA</code> readout <span class="emphasis"><em>cannot be used</em></span>: it will always return <code class="literal">0</code> </p></li></ul></div><p> </p></div><p> The custom energy function must be declared like in the following sample declaration: </p><div class="example"><a name="ex-custom-en-decl"></a><p class="title"><b>Example�2.5.�Custom energy declaration</b></p><div class="example-contents"><pre class="programlisting"> gfloat my_energy (gint x, gint y, gint width, gint height, LqrReadingWindow *rwindow, gpointer extra_data); </pre></div></div><p><br class="example-break"> This function should return the energy at pixel <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>, based on the knowledge of the current image size (obtained from <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em>) and the content of the image in a square around that pixel, which is passed through the <em class="parameter"><code>rwindow</code></em> reading window: in order to access this content, this function must be used: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">gdouble <b class="fsfunc">lqr_rwindow_read</b>(</code></td><td>LqrReadingWindow * <var class="pdparam">rwindow</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">x</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">y</var>, </td></tr><tr><td>�</td><td>channel <var class="pdparam">channel</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> When reading out the content from a window, the <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> parameters are relative to the window centre (which instead is given by the <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> parameters passed to the custom energy function), and they both range between <code class="literal"><span class="symbol">-radius</span></code> and <code class="literal"><span class="symbol">radius</span></code> included (<em class="parameter"><code>radius</code></em> being the same one which is used in <code class="function">lqr_carver_set_energy_function</code>). The parameter <em class="parameter"><code>channel</code></em> specifies which channel to read out; depending on the <em class="parameter"><code>read_type</code></em> passed to <code class="function">lqr_carver_set_energy_function</code> the range and meaning of this parameter will change: for the cases <code class="literal">LQR_ER_BRIGHTNESS</code> and <code class="literal">LQR_ER_LUMA</code> it must be <code class="literal">0</code>, because the readout consists of a single channel, for <code class="literal">LQR_ER_RGBA</code> it must be between <code class="literal">0</code> and <code class="literal">3</code> (and then the readout will contain the RGBA information), while for <code class="literal">LQR_ER_CUSTOM</code> it must be one of the original image channels. </p><p> The <em class="parameter"><code>rwindow</code></em> parameters can be read out from within a custom defined energy function using these functions: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrEnergyReaderType <b class="fsfunc">lqr_rwindow_get_read_t</b>(</code></td><td>LqrReadingWindow * <var class="pdparam">rwindow</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">gint <b class="fsfunc">lqr_rwindow_get_radius</b>(</code></td><td>LqrReadingWindow * <var class="pdparam">rwindow</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">gint <b class="fsfunc">lqr_rwindow_get_channels</b>(</code></td><td>LqrReadingWindow * <var class="pdparam">rwindow</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> Following is an example of how a simple Sobel fliter can be defined and used within this framework: </p><div class="example"><a name="ex-custom-en-def"></a><p class="title"><b>Example�2.6.�Custom energy definition and setup</b></p><div class="example-contents"><pre class="programlisting"> /* definition */ gfloat sobel(gint x, gint y, gint width, gint height, LqrReadingWindow *rw, gpointer extra_data) { gint i, j; gdouble ex = 0; gdouble ey = 0; gdouble k[3][3] = {{0.125, 0.25, 0.125}, {0, 0, 0}, {-0.125, -0.25, -0.125}}; for (i = -1; i <=1; i++) { for (j = -1; j <=1; j++) { ex += k[i + 1][j + 1] * lqr_rwindow_read(rw, i, j, 0); ey += k[j + 1][i + 1] * lqr_rwindow_read(rw, i, j, 0); } } return (gfloat) sqrt(ex * ex + ey * ey); } /* usage */ lqr_carver_set_energy_function (carver, sobel, 1, LQR_ER_BRIGHTNESS, NULL); </pre></div></div><p><br class="example-break"> </p><p> In the above <code class="function">sobel</code> function it is assumed that the radius is 1 and that the readout will consist of a single channel. Furthermore, no boundary checking is performed, and therefore the parameters <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>, <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> are not used. Also, no extra parameters are passed to the function. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> The function <code class="function">lqr_rwindow_read</code> returns <code class="literal">0</code> when the requested value is out of the image boundary or beyond the reading window radius. </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> The energy functions are called over the transposed image in case of vertical scaling, therefore, if they are asymmetrical, the result will be different depending on the scaling orientation (this is the case for example for the <code class="literal">LQR_EF_GRAD_XABS</code> builtin function). </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> The energy function output should be normalised in order to be comparable with the builtin functions, otherwise the scale of the bias would be different depending on the energy function used. This is the reason why in the Sobel filter written above the kernel <em class="parameter"><code>k</code></em> is scaled so that the sum of the absolute values of the matrix is equal to <code class="literal">1</code>. </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> In actual code, the call to <code class="function">lqr_carver_set_energy_function</code> should be protected to test its return value. </p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="energy-readout"></a>Reading out the energy</h3></div></div></div><p> The energy can be read out with three similar functions, all of which fill a buffer provided by the user, but in different ways: two of them are suitable for plotting, while the third one can be used to retreive the true values of the energy, as used internally. </p><p> The first function can be used to get a buffer of normalised values, and it has a simple syntax: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_get_energy</b>(</code></td><td>LqrCarver * <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gfloat * <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">orientation</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> This function writes the the energy values at the time of calling to the given <em class="parameter"><code>buffer</code></em>, ordered by row and then by column. All values range between <code class="literal">0</code> and <code class="literal">1</code>. The buffer must be allocated by the user before calling it. </p><p> The <em class="parameter"><code>orientation</code></em> parameter determines which orientation will be used when computing the energy: <code class="literal">0</code> means horizontal, <code class="literal">1</code> means vertical. </p><p> The <em class="parameter"><code>carver</code></em> need not be initialised; if a bias was added to it (see the <a class="link" href="bias.html" title="Adding a bias">Adding a bias</a> section), its effect is included in the output. </p><p> The above function does not return the true energy which is used internally, because that would not be suitable for plotting, since the energy range is arbitrary (only the energy differences are meaningful, and there is no upper nor lower bound to the values). In order to get the true energy values used internally, this function must be used instead (with the same syntax): </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_get_true_energy</b>(</code></td><td>LqrCarver * <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>gfloat * <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">orientation</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> The third function can be used to fill directly an image buffer: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_carver_get_energy_image</b>(</code></td><td>LqrCarver * <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>void * <var class="pdparam">buffer</var>, </td></tr><tr><td>�</td><td>gint <var class="pdparam">orientation</var>, </td></tr><tr><td>�</td><td>LqrColDepth <var class="pdparam">col_depth</var>, </td></tr><tr><td>�</td><td>LqrImageType <var class="pdparam">image_type</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> In this case, the buffer must be passed as <span class="type">void*</span>, while the <em class="parameter"><code>col_depth</code></em> and <em class="parameter"><code>image_type</code></em> are used to specify the colour depth and the image type, in the same way as is done when creating an <code class="classname">LqrCarver</code> object (see <a class="link" href="generate-multi-size.html#carver-new" title="Carver object creation">Carver objcet creation</a> and the <a class="link" href="generate-multi-size.html#image-type" title="Choosing the image type">Choosing the image type</a> sections). The only restriction is that it is not possible to ask for <code class="literal">LQR_CUSTOM_IMAGE</code> image types. </p><p> For any choice of the parameters, the <em class="parameter"><code>buffer</code></em> will hold a greyscale image, ranging from black (lowest energy) to white (highest energy). The opacity (alpha) will be set to <code class="literal">1</code>, if present. All the information will be stored in the black channel in <code class="literal">LQR_CMYK_IMAGE</code> and <code class="literal">LQR_CMYKA_IMAGE</code> image types. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> Calling the function <code class="function">lqr_carver_get_energy_image</code> with <code class="literal">LQR_COLDEPTH_32F</code> and <code class="literal">LQR_GREY_IMAGE</code> arguments will yield the same result as calling the function <code class="function">lqr_carver_get_energy</code>, but the latter is slightly more efficient. </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="read-out.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="api-manual.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="bias.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Reading the multi-size image�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Adding a bias</td></tr></table></div></body></html> ref-lqr-carver-get-image-type.html 0000644 00000011642 15034750062 0013104 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_get_image_type</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-get-col-depth.html" title="lqr_carver_get_col_depth"><link rel="next" href="ref-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"></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_get_image_type</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-get-col-depth.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-get-enl-step.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-get-image-type"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_get_image_type — get the image type of a <code class="classname">LqrCarver</code> object</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">LqrImageType <b class="fsfunc">lqr_carver_get_image_type</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2794"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_get_image_type</code> returns the image type (i.e. colour model) of the image contained in the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>. </p></div><div class="refsect1"><a name="idm2800"></a><h2>See also</h2><p> <span class="simplelist"><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-new.html" title="lqr_carver_new"><span class="refentrytitle"><code class="function">lqr_carver_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-image-type.html" title="lqr_carver_set_image_type"><span class="refentrytitle"><code class="function">lqr_carver_set_image_type</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-width.html" title="lqr_carver_get_width"><span class="refentrytitle"><code class="function">lqr_carver_get_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-height.html" title="lqr_carver_get_height"><span class="refentrytitle"><code class="function">lqr_carver_get_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-width.html" title="lqr_carver_get_ref_width"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_width</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-ref-height.html" title="lqr_carver_get_ref_height"><span class="refentrytitle"><code class="function">lqr_carver_get_ref_height</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-channels.html" title="lqr_carver_get_channels"><span class="refentrytitle"><code class="function">lqr_carver_get_channels</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-col-depth.html" title="lqr_carver_get_col_depth"><span class="refentrytitle"><code class="function">lqr_carver_get_col_depth</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-enl-step.html" title="lqr_carver_get_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_get_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-orientation.html" title="lqr_carver_get_orientation"><span class="refentrytitle"><code class="function">lqr_carver_get_orientation</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-lqr-carver-get-col-depth.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-get-enl-step.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_get_col_depth</code>�</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_get_enl_step</code></td></tr></table></div></body></html> ref-lqr-progress-set-init.html 0000644 00000016333 15034750062 0012406 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_progress_set_init</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-progress.html" title="Progress reports"><link rel="prev" href="ref-lqr-progress-new.html" title="lqr_progress_new"><link rel="next" href="ref-lqr-progress-set-update.html" title="lqr_progress_set_update"></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_progress_set_init</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-progress-new.html">Prev</a>�</td><th width="60%" align="center">Progress reports</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-update.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-progress-set-init"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_progress_set_init — execude custom code before each rescaling operation</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">LqrRetVal <b class="fsfunc">lqr_progress_set_init</b>(</code></td><td>LqrProgress* <var class="pdparam">p</var>, </td></tr><tr><td>�</td><td>LqrProgressFuncInit <var class="pdparam">init_func</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm5218"></a><h2>Description</h2><p> The function <code class="function">lqr_progress_set_init</code> sets the hook <em class="parameter"><code>init_func</code></em> to the <code class="classname">LqrProgress</code> object pointed to by <em class="parameter"><code>p</code></em>. </p><p> The function <em class="parameter"><code>init_func</code></em> is of type <code class="classname">LqrProgressFuncInit</code>, whose prototype is defined by: </p><pre class="programlisting"> typedef LqrRetVal (*LqrProgressFuncInit) (const gchar* init_message); </pre><p> Each time that the function <a class="xref" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a> performs a rescale operation (recall that it can perform more than one rescale operation at each call) this function will be called first, with a string argument passed through the parameter <em class="parameter"><code>init_message</code></em>, which is different for horizontal and vertical rescalings. </p><p> The message arguments can be set with the functions <a class="xref" href="ref-lqr-progress-set-init-width-message.html" title="lqr_progress_set_init_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_width_message</code></span>(3)</a> and <a class="xref" href="ref-lqr-progress-set-init-height-message.html" title="lqr_progress_set_init_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_height_message</code></span>(3)</a>. </p><p> The default values for newly created <code class="classname">LqrProgress</code> objects are: </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">Horizontal:</span></dt><dd><p> <code class="computeroutput">"Resizing width..."</code> </p></dd><dt><span class="term">Vertical:</span></dt><dd><p> <code class="computeroutput">"Resizing height..."</code> </p></dd></dl></div><p> </p></div><div class="refsect1"><a name="idm5247"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm5250"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-ret-val.html" title="LqrRetVal"><span class="refentrytitle"><span class="type">LqrRetVal</span></span>(3)</a>, <a class="xref" href="ref-lqr-progress-new.html" title="lqr_progress_new"><span class="refentrytitle"><code class="function">lqr_progress_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update.html" title="lqr_progress_set_update"><span class="refentrytitle"><code class="function">lqr_progress_set_update</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end.html" title="lqr_progress_set_end"><span class="refentrytitle"><code class="function">lqr_progress_set_end</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init-width-message.html" title="lqr_progress_set_init_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_width_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-init-height-message.html" title="lqr_progress_set_init_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_init_height_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end-width-message.html" title="lqr_progress_set_end_width_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_width_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-end-height-message.html" title="lqr_progress_set_end_height_message"><span class="refentrytitle"><code class="function">lqr_progress_set_end_height_message</code></span>(3)</a>, <a class="xref" href="ref-lqr-progress-set-update-step.html" title="lqr_progress_set_update_step"><span class="refentrytitle"><code class="function">lqr_progress_set_update_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</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-lqr-progress-new.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-progress.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-progress-set-update.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_progress_new</code>�</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_progress_set_update</code></td></tr></table></div></body></html> ref-lqr-carver-set-alpha-channel.html 0000644 00000012345 15034750062 0013553 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_set_alpha_channel</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-set-image-type.html" title="lqr_carver_set_image_type"><link rel="next" href="ref-lqr-carver-set-black-channel.html" title="lqr_carver_set_black_channel"></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_set_alpha_channel</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-set-image-type.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-black-channel.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-set-alpha-channel"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_set_alpha_channel — sets the alpha channel index in a <code class="classname">LqrCarver</code> object</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">LqrRetVal <b class="fsfunc">lqr_carver_set_alpha_channel</b>(</code></td><td> LqrCarver * <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td> gint <var class="pdparam">channel_index</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm2043"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_set_alpha_channel</code> sets the alpha channel index of the image stored in the <code class="classname">LqrCarver</code> pointed to by <em class="parameter"><code>carver</code></em> to <em class="parameter"><code>channel_index</code></em> (between <code class="literal">0</code> and <code class="literal">channels - 1</code>, where <code class="literal">channels</code> is the number of colour channels of the <em class="parameter"><code>carver</code></em>). </p><p> Use a negative value for <em class="parameter"><code>cahnnel_index</code></em> to specify that no alpha channel is present. </p><p> If the specified channel coincides with the current value of the black channel, the black channel is unset. </p><p> Calling this function sets the image time of the <em class="parameter"><code>carver</code></em> to <code class="literal">LQR_CUSTOM_IMAGE</code>. </p></div><div class="refsect1"><a name="idm2060"></a><h2>Return value</h2><p> The return value follows the Liquid Rescale library signalling system. </p></div><div class="refsect1"><a name="idm2063"></a><h2>See also</h2><p> <span class="simplelist"><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-new.html" title="lqr_carver_new"><span class="refentrytitle"><code class="function">lqr_carver_new</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-image-type.html" title="lqr_carver_set_image_type"><span class="refentrytitle"><code class="function">lqr_carver_set_image_type</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-black-channel.html" title="lqr_carver_set_black_channel"><span class="refentrytitle"><code class="function">lqr_carver_set_black_channel</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-image-type.html" title="lqr_carver_get_image_type"><span class="refentrytitle"><code class="function">lqr_carver_get_image_type</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-get-channels.html" title="lqr_carver_get_channels"><span class="refentrytitle"><code class="function">lqr_carver_get_channels</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-lqr-carver-set-image-type.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-set-black-channel.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_set_image_type</code>�</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_set_black_channel</code></td></tr></table></div></body></html> ref-lqr-rwindow-get-read-t.html 0000644 00000007565 15034750062 0012437 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_rwindow_get_read_t</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-energy.html" title="Energy"><link rel="prev" href="ref-lqr-rwindow-read.html" title="lqr_rwindow_read"><link rel="next" href="ref-lqr-rwindow-get-radius.html" title="lqr_rwindow_get_radius"></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_rwindow_get_read_t</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-rwindow-read.html">Prev</a>�</td><th width="60%" align="center">Energy</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-rwindow-get-radius.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-rwindow-get-read-t"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_rwindow_get_read_t — get the reader type of a <code class="classname">LqrReadingWindow</code> object</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">LqrEnergyReaderType <b class="fsfunc">lqr_rwindow_get_read_t</b>(</code></td><td>LqrReadingWindow* <var class="pdparam">rwindow</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm4615"></a><h2>Description</h2><p> The function <code class="function">lqr_rwindow_get_read_t</code> returns the reader type associated with the reading window <em class="parameter"><code>rwindow</code></em>. </p><p> The reader types are described in the page for <a class="xref" href="ref-lqr-carver-set-energy-function.html" title="lqr_carver_set_energy_function"><span class="refentrytitle"><code class="function">lqr_carver_set_energy_function</code></span>(3)</a>. </p></div><div class="refsect1"><a name="idm4622"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-set-energy-function.html" title="lqr_carver_set_energy_function"><span class="refentrytitle"><code class="function">lqr_carver_set_energy_function</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-read.html" title="lqr_rwindow_read"><span class="refentrytitle"><code class="function">lqr_rwindow_read</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-radius.html" title="lqr_rwindow_get_radius"><span class="refentrytitle"><code class="function">lqr_rwindow_get_radius</code></span>(3)</a>, <a class="xref" href="ref-lqr-rwindow-get-channels.html" title="lqr_rwindow_get_channels"><span class="refentrytitle"><code class="function">lqr_rwindow_get_channels</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-lqr-rwindow-read.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-energy.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-lqr-rwindow-get-radius.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_rwindow_read</code>�</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_rwindow_get_radius</code></td></tr></table></div></body></html> ref-lqr-carver-set-side-switch-frequency.html 0000644 00000014202 15034750062 0015274 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_set_side_switch_frequency</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.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-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><link rel="next" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"></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_set_side_switch_frequency</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-set-dump-vmaps.html">Prev</a>�</td><th width="60%" align="center">Carver objects</th><td width="20%" align="right">�<a accesskey="n" href="ref-lqr-carver-set-progress.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-set-side-switch-frequency"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_set_side_switch_frequency — set <code class="classname">LqrCarver</code> object side switch frequency</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">void <b class="fsfunc">lqr_carver_set_side_switch_frequency</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>guint <var class="pdparam">switch_frequency</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm3167"></a><h2>Description</h2><p> When the function <a class="xref" href="ref-lqr-carver-resize.html" title="lqr_carver_resize"><span class="refentrytitle"><code class="function">lqr_carver_resize</code></span>(3)</a> is invoked, it computes a relevance value for each pixel in the image, then chooses the optimal seam to carve based on such relvance values. However, in the case two seams are equivalent (which may happen when large portions of the image have the same colour, for example), the algorithm always chooses the seams from one side. </p><p> In order to overcome this effect, an option is given to automatically switch the favoured side during rescaling, at the cost of a slightly worse performance. </p><p> The function <code class="function">lqr_carver_set_side_switch_frequency</code> sets the side switch frequency to <em class="parameter"><code>switch_frequency</code></em> for the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em>. This will have the effect that, for each rescale operation, the favoured side will be switched <em class="parameter"><code>switch_frequency</code></em> times (or as much times as the number of pixels to rescale). </p><p> The default value for newly created <code class="classname">LqrCarver</code> objects is <code class="literal">0</code>. </p><p> As for the final result, a very small value (e.g. <code class="literal">1<code class="literal"> to </code>4</code>) will normally suffice to balance the left and right side of the image (or the top and the boddom sides for vertical rescalings), without noticeable computational costs. However, in order to obtain a smoother behaviour for the visibiliy map, i.e. for the intermediate steps, higher values may be required. </p></div><div class="refsect1"><a name="idm3184"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-set-enl-step.html" title="lqr_carver_set_enl_step"><span class="refentrytitle"><code class="function">lqr_carver_set_enl_step</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-resize-order.html" title="lqr_carver_set_resize_order"><span class="refentrytitle"><code class="function">lqr_carver_set_resize_order</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-dump-vmaps.html" title="lqr_carver_set_dump_vmaps"><span class="refentrytitle"><code class="function">lqr_carver_set_dump_vmaps</code></span>(3)</a>, <a class="xref" href="ref-lqr-carver-set-progress.html" title="lqr_carver_set_progress"><span class="refentrytitle"><code class="function">lqr_carver_set_progress</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>, <a class="xref" href="ref-lqr-carver-set-use-cache.html" title="lqr_carver_set_use_cache"><span class="refentrytitle"><code class="function">lqr_carver_set_use_cache</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-lqr-carver-set-dump-vmaps.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-set-progress.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_set_dump_vmaps</code>�</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_set_progress</code></td></tr></table></div></body></html> vmaps.html 0000644 00000041026 15034750062 0006565 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Dealing with the visibility maps (the seams)</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="api-manual.html" title="Chapter�2.�LqR library API user manual"><link rel="prev" href="tuning.html" title="Tuning"><link rel="next" href="attach-images.html" title="Attaching extra images"></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">Dealing with the visibility maps (the seams)</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="tuning.html">Prev</a>�</td><th width="60%" align="center">Chapter�2.�LqR library API user manual</th><td width="20%" align="right">�<a accesskey="n" href="attach-images.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="vmaps"></a>Dealing with the visibility maps (the seams)</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="vmaps.html#vmap-dump">Dumping the visibility map</a></span></dt><dt><span class="sect2"><a href="vmaps.html#activate-dump">Storing the visibility maps</a></span></dt><dt><span class="sect2"><a href="vmaps.html#access-vmap">Accessing the internally attached visibility maps</a></span></dt><dt><span class="sect2"><a href="vmaps.html#vmaps-objs">The visibility map objects</a></span></dt><dt><span class="sect2"><a href="vmaps.html#import-vmap">Importing a visibility map in a carver</a></span></dt><dt><span class="sect2"><a href="vmaps.html#save-load-vmaps">Saving and loading visibility maps to/from files</a></span></dt></dl></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="vmap-dump"></a>Dumping the visibility map</h3></div></div></div><p> The visibility map can be saved at any moment by calling the function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrVMap* <b class="fsfunc">lqr_vmap_dump</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> This function will return a pointer to a newly allocated <code class="classname">LqrVMap</code> object, or <code class="literal"><span class="returnvalue">NULL</span></code> in case of failure. See also the section "<a class="link" href="vmaps.html#vmaps-objs" title="The visibility map objects">The visibility map objects</a>". </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="activate-dump"></a>Storing the visibility maps</h3></div></div></div><p> By default, the computed visibility maps are wasted. Instead of saving them individually, it is possible to automatically dump them at the end of the carving process, attaching them to their associated <code class="classname">LqrCarver</code>. In order to activate this feature, the following function has to be called: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">lqr_carver_set_dump_vmaps</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> This will have the effect of dumping the visibility map each time <code class="function">lqr_carver_resize</code> is invoked, and storing it internally. When resizing along both directions, two maps will be dumped, one for each direction. </p><p> In order to revert the effect of <code class="function">lqr_carver_set_dump_vmaps</code>, thus stopping the automatic dumping, use the function </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">lqr_carver_set_no_dump_vmaps</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> Alternatively, the internal storage mechanism can be called over the current visibility map at any given moment by calling this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_vmap_internal_dump</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> The dumped maps are stored inside <code class="classname">LqrVMap</code> objects, and these are attached to their corresponing <code class="classname">LqrCarver</code> object through a linked list, whose type is <code class="classname">LqrVMapList</code> </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="access-vmap"></a>Accessing the internally attached visibility maps</h3></div></div></div><p> To access the maps attached to a carver one has first to obtain the pointer to the list, with the function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrVMapList* <b class="fsfunc">lqr_vmap_list_start</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> Then, one can iterate through the attached maps by using these two functions: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrVMap* <b class="fsfunc">lqr_vmap_list_current</b>(</code></td><td>LqrVMapList* <var class="pdparam">list</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrVMapList* <b class="fsfunc">lqr_vmap_list_next</b>(</code></td><td>LqrVMapList* <var class="pdparam">list</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> Here is a sample code usage: </p><div class="example"><a name="ex-vmaplist1"></a><p class="title"><b>Example�2.7.�Accessing visibility maps #1</b></p><div class="example-contents"><pre class="programlisting"> LqrVMap *vmap; LqrVMapList *list; list = lqr_vmap_list_start (carver); while (list) { vmap = lqr_vmap_list_current (list); /* ... do something on vmap ... */ list = lqr_vmap_list_next (list); } </pre></div></div><p><br class="example-break"> </p><p> The maps will always be accessed in the order in which they were dumped. </p><p> Alternatively, one can apply a function to all the elements of the list, through this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_vmap_list_foreach</b>(</code></td><td>LqrVMapList* <var class="pdparam">list</var>, </td></tr><tr><td>�</td><td>LqrVMapFunc <var class="pdparam">func</var>, </td></tr><tr><td>�</td><td>gpointer <var class="pdparam">data</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> To use this second method, you'll need to define a function first, as in this sample code: </p><div class="example"><a name="ex-vmaplist2"></a><p class="title"><b>Example�2.8.�Accessing visibility maps #2</b></p><div class="example-contents"><pre class="programlisting"> LqrRetVal my_func (LqrVMap vmap, gpointer data) { /* ... do something on vmap ... */ return LQR_OK; } LqrVMapList *list; list = lqr_vmap_list_start (carver); lqr_vmap_list_foreach (list, my_func, NULL); </pre></div></div><p><br class="example-break"> </p><p> In the above example, no data is actually passed on to the function. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> In actual code the call to <code class="function">lqr_vmap_list_foreach</code> should be protected to test its return value, which is <code class="literal"><span class="errorcode">LQR_OK</span></code> if all <code class="function">my_func</code> calls have been successful, or it will hold the first non-successful return value from <code class="function">my_func</code>. </p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="vmaps-objs"></a>The visibility map objects</h3></div></div></div><p> The <code class="classname">LqrVMap</code> objects contain an int buffer with the actual map data (plain array, ordered by row), plus all the information needed to be able to recover it from scratch. </p><p> The information can be extracted with these functions: </p><pre class="programlisting"> gint* <code class="function">lqr_vmap_get_data</code> (<code class="classname">LqrVMap</code>* <em class="parameter"><code>vmap</code></em>); gint <code class="function">lqr_vmap_get_width</code> (<code class="classname">LqrVMap</code>* <em class="parameter"><code>vmap</code></em>); gint <code class="function">lqr_vmap_get_height</code> (<code class="classname">LqrVMap</code>* <em class="parameter"><code>vmap</code></em>); gint <code class="function">lqr_vmap_get_orientation</code> (<code class="classname">LqrVMap</code>* <em class="parameter"><code>vmap</code></em>); gint <code class="function">lqr_vmap_get_depth</code> (<code class="classname">LqrVMap</code>* <em class="parameter"><code>vmap</code></em>); </pre><p> </p><p> The first one returns a pointer to the data buffer. </p><p> The orientation of the map is 0 if the map is to be used for horizontal rescaling, 1 otherwise. </p><p> The depth of the map is the maximum amount of rescaling possible with that map, either shrinking or enlarging. </p><p> </p><div class="example"><a name="vmap-data"></a><p class="title"><b>Example�2.9.�Reading visibility maps data</b></p><div class="example-contents"><p> If we have a <code class="classname">LqrVMap</code> pointer called <em class="parameter"><code>vmap</code></em>, we could access the value at <code class="literal">(<span class="symbol">x</span>,<span class="symbol">y</span>)</code> by: </p><pre class="programlisting"> gint *buffer; gint width; gint vis; buffer = lqr_vmap_get_data (vmap); width = lqr_vmap_get_width (vmap); vis = buffer[y * width + x]; </pre><p> Uninitialised points will yield <code class="literal"><span class="symbol">vis</span> = 0</code>. For initialised points, <code class="literal"><span class="symbol">vis</span></code> will store a positive value between <code class="literal">1</code> (least visible points, the first to be carved away or to be duplicated) and <code class="literal">(<em class="parameter"><code>depth</code></em> + 1)</code> (most visible points, the last to be carved away or to be duplicated). </p><p> If the orientation is 0, the map allows resizing in the whole range form <code class="literal">(<em class="parameter"><code>width</code></em> - <em class="parameter"><code>depth</code></em>)</code> to <code class="literal">(<em class="parameter"><code>width</code></em> + <em class="parameter"><code>depth</code></em>)</code>. If the orientation is 1, the analogue formula holds with <em class="parameter"><code>height</code></em> in place of <em class="parameter"><code>width</code></em>. </p></div></div><p><br class="example-break"> </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="import-vmap"></a>Importing a visibility map in a carver</h3></div></div></div><p> Having an <code class="classname">LqrVMap</code> object, one can load it in an <code class="classname">LqrCarver</code> simply by calling this function: </p><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">LqrRetVal <b class="fsfunc">lqr_vmap_load</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var>, </td></tr><tr><td>�</td><td>LqrVMap* <var class="pdparam">vmap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div><p> </p><p> The carver must not to be initialised, neither before nor after invoking this function. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> This implies that the map cannot be updated, and that it will only be possible to resize the carver by an amount <em class="parameter"><code>depth</code></em> along the orientation given by <code class="function">lqr_vmap_orientation</code>. The enlargment step is also set to its maximum, 2.0. Invoking <code class="function">lqr_carver_resize</code> with an out-of-bounds argument results in a <span class="errortype">fatal</span> error (i.e. it returns <code class="literal"><span class="errorcode">LQR_ERROR</span></code>). </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> Do not attach other carvers after you have loaded a visibility map (see also the <a class="link" href="attach-images.html" title="Attaching extra images">Attaching extra images</a> section). </p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="save-load-vmaps"></a>Saving and loading visibility maps to/from files</h3></div></div></div><p> The library does not include methods to load/save visibility maps to/from files. However, a way to do so is shown in the demo program `<span class="application">liquidrescale</span>' in the `<code class="filename">examples</code>' directory. </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="tuning.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="api-manual.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="attach-images.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Tuning�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Attaching extra images</td></tr></table></div></body></html> seam-carve.html 0000644 00000012460 15034750062 0007462 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Seam carving in brief</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="Introduction.html" title="Chapter�1.�Introduction"><link rel="prev" href="about-this-doc.html" title="About this document"><link rel="next" href="overview.html" title="Overview of the library"></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">Seam carving in brief</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="about-this-doc.html">Prev</a>�</td><th width="60%" align="center">Chapter�1.�Introduction</th><td width="20%" align="right">�<a accesskey="n" href="overview.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="seam-carve"></a>Seam carving in brief</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="seam-carve.html#about-enlarge">About enlarging</a></span></dt></dl></div><p> Basically, the rescaling algorithm tries to find out which parts of the image are important, and which are not, based on the contrast between adjacent pixels; then, the image is resized through the elimination or insertion of continuous paths, called `seams'. The seams connect the top of the image with the bottom when rescaling horizontally, or they connect the left side with the right side when rescaling vertically. In the seam carving process, seams are removed in sequence, therefore shrinking the image by one pixel at a time. The seam insertion process mirrors the seam carving process, introducing interpolated seams in regions where they would have been carved. </p><p> Once it has been computed, the carving information can be efficiently stored in a so called multi-sized image, which can be used to reproduce the carving operation on the fly at any later moment. </p><p> It often happens that the automatic feature detection fails to identify as significant some image regions; in these cases a preservation mask can be specified, which marks those regions. In fact, the feature recognition process can be manually driven quite easily to its full extent, by using custom masks. </p><p> See also the <a class="link" href="references.html" title="Chapter�4.�References">References</a> section for more information about the algorithm. </p><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="about-enlarge"></a>About enlarging</h3></div></div></div><p> As mentioneed above, the enlargment process mirrors the carving process. More precisely, in order to enlarge the image by a given amount of pixels, say N, the library first computes which would be the first N seams to be removed; then, it inserts N new seams nearby those. </p><p> This means that it is clearly not possible to go beyond twice the original size in a single step. It also means that doubling the image size in this way is just equivalent to standard scaling, since the result is that each seam is just duplicated. For these reasons, the library rescaling engine automatically divides enlarging sessions in steps, and allows to set the step size. </p><p> This same issue also affects in a tricky way the preservation of image areas when enlarging: suppose your image is 1000 pixels wide, and you have protected an area which is 800 pixels wide. It is then clear that you cannot shrink the image to less than 800 pixels without affecting the preserved area, but the same is true when enlarging, so you should not go beyond 1200 pixels in a single step (= 1000 + (1000 - 800)), i.e. you should use a value lower than 1.2 for the enlargement step size. </p><p> In general, however, the optimal enlargement step size depends on the image, since large step sizes have the disadvantages discussed above, while small step sizes will tend to inflate the same areas of the image over and over at each step. </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="about-this-doc.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="Introduction.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="overview.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">About this document�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Overview of the library</td></tr></table></div></body></html> ref-lqr-carver-rigmask-clear.html 0000644 00000005742 15034750062 0013013 0 ustar 00 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>lqr_carver_rigmask_clear</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="The Liquid Rescale library Manual"><link rel="up" href="ref-rigmask.html" title="Rigidity masks"><link rel="prev" href="ref-lqr-carver-rigmask-add.html" title="lqr_carver_rigmask_add"><link rel="next" href="ref-progress.html" title="Progress reports"></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_rigmask_clear</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref-lqr-carver-rigmask-add.html">Prev</a>�</td><th width="60%" align="center">Rigidity masks</th><td width="20%" align="right">�<a accesskey="n" href="ref-progress.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="ref-lqr-carver-rigmask-clear"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lqr_carver_rigmask_clear — clear an <code class="classname">LqrCarver</code> rigidity mask</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">void <b class="fsfunc">lqr_carver_rigmask_clear</b>(</code></td><td>LqrCarver* <var class="pdparam">carver</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">�</div></div></div><div class="refsect1"><a name="idm5127"></a><h2>Description</h2><p> The function <code class="function">lqr_carver_rigmask_clear</code> clears the rigidity mask from the <code class="classname">LqrCarver</code> object pointed to by <em class="parameter"><code>carver</code></em> </p></div><div class="refsect1"><a name="idm5133"></a><h2>See also</h2><p> <span class="simplelist"><a class="xref" href="ref-lqr-carver-rigmask-add.html" title="lqr_carver_rigmask_add"><span class="refentrytitle"><code class="function">lqr_carver_rigmask_add</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-lqr-carver-rigmask-add.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="ref-rigmask.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="ref-progress.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">lqr_carver_rigmask_add</code>�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Progress reports</td></tr></table></div></body></html>
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.03 |
proxy
|
phpinfo
|
Settings