Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 7faa4cd12598db7d59564e3dc9a0913c > files > 446

vips-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_PREPARE(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_prepare, im_prepare_to - fill region with data 
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
<b>#include &lt;vips/vips.h&gt;</b>

<p> int im_prepare( reg, r ) <br>
REGION *reg; <br>
Rect *r; 
<p> int im_prepare_to( reg, dest, r, x, y ) <br>
REGION *reg, *dest; <br>
Rect *r; <br>
int x, y; 
<p> int im_prepare_many( reg, r ) <br>
REGION **reg; <br>
Rect *r; 
<p> 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
<a href='im_prepare.3.html'><b>im_prepare(3)</b></a>
 fills region reg with pels covering
the area inside r.  
<p> r is expected to lie within the image on which reg
was defined; if it does not it will be clipped against the size of the
image. Consequence: if 
<p>     im_prepare( reg, r )<br>
 
<p> succeeds, VIPS guarantees that pels within reg-&gt;valid may be read from
reg with <a href='IM_REGION_ADDR.3.html'><b>IM_REGION_ADDR(3)</a>
.</b> It does not guarantee that you may read all
of r! 
<p> The action taken by <a href='im_prepare.3.html'>im_prepare(3)</a>
 depends upon the image descriptor
on which reg was defined: 
<p> PARTIAL: The area requested is clipped against
the edges of the image, local memory is attached to reg with <a href='im_region_buffer.3.html'><b>im_region_buffer(3)</b></a>

and that area requested from the image&rsquo;s generate function, see <a href='im_generate.3.html'><b>im_generate(3)</a>
.</b>
If necessary, a new sequence is started. 
<p> SETBUF: MMAPIN: MMAPINRW: The
area defined by r is clipped against the edges of the image, and that area
attached to reg. 
<p> <a href='im_prepare_to.3.html'><b>im_prepare_to(3)</b></a>
 is very like <a href='im_prepare.3.html'><b>im_prepare(3)</a>
,</b> but rather
than writing pixels to local memory on reg (or attaching reg to some other
piece of memory), it instead writes pixels into the region dest at position
x, y. The parameters dest, r, x, y behave in the same way as the paramaters
to <a href='im_region_region.3.html'><b>im_region_region(3)</a>
.</b> 
<p> Effectively, it&rsquo;s just like <a href='im_prepare.3.html'><b>im_prepare(3)</b></a>
 followed
by a copy operation. Except that the copy will be skipped when possible.

<p> This call is used by (among others) <a href='im_generate.3.html'><b>im_generate(3)</b></a>
 to make operations
output to disc buffers, and by <a href='im_embed.3.html'><b>im_embed(3)</b></a>
 to get images written inside
larger images. 
<p> <a href='im_prepare_many.3.html'><b>im_prepare_many(3)</b></a>
 prepares the same Rect on a NULL terminated
array of REGION pointers, as returned by <a href='im_start_many.3.html'><b>im_start_many(3)</b></a>
. 
<p> 
<h2><a name='sect3' href='#toc3'>Return Value</a></h2>
The
function 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_open.3.html'>im_open(3)</a>
.  
<h2><a name='sect5' href='#toc5'>Copyright</a></h2>
National Gallery 
<h2><a name='sect6' href='#toc6'>Author</a></h2>
J. Cupitt - 23/7/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>