Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > c109337651527e96d7bb9adc83c5b18a > files > 226

libvips-devel-7.18.2-1mdv2010.0.i586.rpm

<!-- manual page source format generated by PolyglotMan v3.2, -->
<!-- available at http://polyglotman.sourceforge.net/ -->

<html>
<head>
<title>IM_IOCHECK(3) manual page</title>
</head>
<body bgcolor='white'>
<a href='#toc'>Table of Contents</a><p>

<h2><a name='sect0' href='#toc0'>Name</a></h2>
im_demand_hint - hint on demand style for <a href='im_generate.3.html'>im_generate(3)</a>
 
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
#include
&lt;vips/vips.h&gt; 
<p> int im_demand_hint( im, hint, in1, in2, ..., NULL ) <br>
IMAGE *im, *in1, *in2, ...; <br>
im_demand_type hint; 
<p> int im_demand_hint_array( im, hint, in ) <br>
IMAGE *im, **in; <br>
im_demand_type hint; 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
<a href='im_demand_hint.3.html'><b>im_demand_hint(3)</a>
 </b> suggests to <a href='im_generate.3.html'>im_generate(3)</a>

the sorts of demand with which this image processing operation would be
happiest.  
<p> <b>im</b> is the image this operation is generating. <b>hint</b> is the demand
style this operation would like (see below), and <b>in1 ...</b> is a NULL-terminated
list of the image upon which this output image directly depends, that is,
the images which this operation will call <a href='im_prepare.3.html'>im_prepare(3)</a>
 for. 
<p> This list
of parent images is necessary, as <a href='im_demand_hint.3.html'>im_demand_hint(3)</a>
 needs to know what
demand style this operation&rsquo;s ancestors have requested. If an ancestor of
this operation has specified a very restrictive demand style, then this
operation must fall back to that restrictive style and ignore the hint
given in this call to <a href='im_demand_hint.3.html'>im_demand_hint(3)</a>
. 
<p> VIPS currently supports three
demand styles. More may be added in the future. These demand styles are given
below in order of increasing restrictiveness.  When demanding output from
a pipeline, <a href='im_generate.3.html'>im_generate(3)</a>
 will use the most restrictive of the styles
requested by the operations in the pipeline. 
<p> IM_THINSTRIP <br>
This operation would like to output strips the width of the image and a
few pels high. This is option suitable for point-to-point operations, such
as those in the arithmetic package. 
<p> This option is only efficient for cases
where each output pel depends upon the pel in the corresponding position
in the input image. 
<p> IM_FATSTRIP <br>
This operation would like to output strips the width of the image and as
high as possible. This option is suitable for area operations which do not
violently transform coordinates, such as <a href='im_conv.3.html'>im_conv(3)</a>
.  
<p> IM_SMALLTILE <br>
This is the most general demand format, and is the default. Output is demanded
in small (around 100x100 pel) sections. This style works reasonably efficiently,
even for bizzare operations like 45 degree rotate. 
<p> IM_ANY <br>
This image is not being demand-read from a disc file (even indirectly) so
any demand style is OK. It&rsquo;s used for things like <a href='im_black.3.html'><b>im_black(3)</b></a>
 where the pixels
are calculated. 
<p> <b></b> <a href='im_demand_hint_array.3.html'>im_demand_hint_array(3)</a>
 works exactly as <a href='im_demand_hint.3.html'>im_demand_hint(3)</a>
,
but expects a pointer to a NULL-terminated array of parent images as its
third argument. You may use <a href='im_allocate_input_array.3.html'>im_allocate_input_array(3)</a>
, if you wish, to
build this structure. 
<p> As an example, here is part of the code for <a href='im_invert.3.html'>im_invert(3)</a>
.
In this operation, each output pel depends upon the corresponding input
pel. In other words, there is no coordinate transformation in <a href='im_prepare.3.html'>im_prepare(3)</a>
.
This style of operation is most efficient with IM_THINSTRIP IO. 
<p> int im_invert(
IMAGE *in, IMAGE *out ) <br>
{ <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;if( in-&gt;Coding != NOCODING ) {<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;im_errormsg( "im_invert: input coded" );<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;return( -1 );<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;}<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;if( in-&gt;BandFmt != FMTUCHAR ) {<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;im_errormsg( "im_invert: input not UCHAR" );<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;return( -1 );<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;}<br>
 <br>
        if( im_piocheck( in, out ) )<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;return( -1 );<br>
 <br>
        if( im_cp_desc( out, in ) ) <br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;return( -1 );<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;if( im_demand_hint( out, IM_THINSTRIP, in, NULL ) )<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp; return( -1 );<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;if( im_generate( out,<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;im_start_one, inv_gen, im_stop_one, in, NULL ) )<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;<tt> </tt>&nbsp;return( -1 );<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;return( 0 );<br>
 <br>
} 
<p> 
<h2><a name='sect3' href='#toc3'>Return Value</a></h2>
All functions returns 0 on success and non-zero on error.

<h2><a name='sect4' href='#toc4'>See Also</a></h2>
<a href='im_generate.3.html'>im_generate(3)</a>
, <a href='im_prepare.3.html'>im_prepare(3)</a>
.  
<h2><a name='sect5' href='#toc5'>Copyright</a></h2>
National Gallery 
<h2><a name='sect6' href='#toc6'>Author</a></h2>
J.
Cupitt - 3/9/93  <p>

<hr><p>
<a name='toc'><b>Table of Contents</b></a><p>
<ul>
<li><a name='toc0' href='#sect0'>Name</a></li>
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
<li><a name='toc2' href='#sect2'>Description</a></li>
<li><a name='toc3' href='#sect3'>Return Value</a></li>
<li><a name='toc4' href='#sect4'>See Also</a></li>
<li><a name='toc5' href='#sect5'>Copyright</a></li>
<li><a name='toc6' href='#sect6'>Author</a></li>
</ul>
</body>
</html>