Sophie

Sophie

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

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_TIFF(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_tiff2vips, im_tiff2vips - convert TIFF images to and from VIPS format

<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
#include &lt;vips/vips.h&gt; 
<p> int im_tiff2vips( const char *filename, IMAGE
*out ) 
<p> int im_vips2tiff( IMAGE *in, const char *filename )  
<p> 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
<a href='im_tiff2vips.3.html'><b>im_tiff2vips(3)</a>

</b> reads the tiff image in filename, and writes the image out in VIPS format.
It is a full baseline TIFF 6 reader, with extensions for tiled images,
multipage images, LAB colour space, pyramidal images and JPEG compression.

<p> You can embed options in the filename. They have the form: 
<p>   filename.tif:&lt;page-number&gt;<br>
 
<p> <b>page-number </b> lets you read a particular page out of a multipage TIFF file.
For example: 
<p>   "fred.tif:12"<br>
 
<p> will read page 12 (numbering from page zero) from the TIFF image. 
<p> <a href='im_vips2tiff.3.html'><b>im_vips2tiff(3)</a>

</b> reads the image in and writes a TIFF file to the specified filename. The
filename may include an optional mode string, following a &rsquo;:&rsquo; character. For
example, "fred.tif" would write a default TIFF file (flat, strips, no compression).
Writing to "fred.tif:deflate,tile:64x64" would write a ZIP-coded image, split
into 64 by 64 pixel tiles. 
<p> The mode string has the following syntax: 
<p> 
 &lt;compression&gt;,&lt;layout&gt;,&lt;multi-res&gt;,&lt;format&gt;,&lt;resolution&gt;,&lt;icc&gt;<br>
 
<p> where &lt;compression&gt; is one of: 
<p>    "none"      - no compression<br>
    "jpeg"      - JPEG compression<br>
    "deflate"   - ZIP (deflate) compression<br>
    "packbits"  - TIFF packbits compression<br>
    "ccittfax4" - CCITT Group 4 fax encoding<br>
    "lzw"       - Lempel-Ziv compression<br>
 
<p> "jpeg" compression can be followed by a ":" character and a JPEG quality
level; "lzw" and "deflate" can be followed by a ":" and predictor value.
The default compression type is "none", the default JPEG quality factor
is 75. 
<p> Predictor is not set by default. There are three predictor values
recognised at the moment (2007, July): 1 is no prediction, 2 is a horizontal
differencing and 3 is a floating point predictor. Refer to the libtiff specifications
for further discussion of various predictors. In short, predictor helps
to better compress image, especially in case of digital photos or scanned
images and bit depths &gt; 8. Try it to find whether it works for your images.
 <br>
 JPEG compression is a good lossy compressor for photographs, packbits
is good for 1-bit images, and deflate is the best lossless compression TIFF
can do. LZW has patent problems and is no longer recommended. 
<p> &lt;layout&gt; is
one of: 
<p>    "strip"    - strip layout<br>
    "tile"     - tiled layout<br>
 
<p> "tile" layout can be followed by a ":" character and the horizontal and
vertical tile size, separated by a "x" character. The default layout is
"strip", and the default tile size is 128 by 128 pixels. 
<p> &lt;multi-res&gt; is one
of: 
<p>    "flat"     - single image<br>
    "pyramid"  - many images arranged in a pyramid<br>
 
<p> The default multi-res mode is "flat". 
<p> &lt;format&gt; is one of: 
<p>    "manybit"
 - don&rsquo;t bit-reduce images<br>
    "onebit"   - one band 8 bit images are saved as 1 bit<br>
 
<p> The default format is "multibit".  
<p> &lt;resolution&gt; is one of: 
<p>    "res_cm"
  - output resolution unit is pixels per centimetre<br>
    "res_inch" - output resolution unit is pixels per inch<br>
 
<p> The default resolution unit is taken from the header field "resolution-unit"
(IM_META_RESOLUTION_UNIT in C). If this field is not set, then VIPS defaults
to cm. 
<p> This may be overridden by the &lt;resolution&gt; option. The unit can optionally
be followed by a ":" character and the horizontal and vertical resolution,
separated by a "x" character. You can have a single number with no "x" and
set the horizontal and vertical resolutions together. The default unit is
cm, and the default resolution is taken from the VIPS header. 
<p> &lt;icc&gt; is the

<p>filename of an ICC profile to embed in the TIFF file 
<p> The TIFF reader and
writer are based on Sam Leffler&rsquo;s TIFF library, and the IJG JPEG coder. 
<p>

<h2><a name='sect3' href='#toc3'>Examples</a></h2>

<p> The call: 
<p>   im_vips2tiff fred.v fred.tif <br>
 
<p> Writes a striped, uncompressed TIFF image. Almost anything should be able
to read this. 
<p>   im_vips2tiff fred.v fred.tif:jpeg,tile,pyramid<br>
 
<p> Writes a tiled JPEG pyramid image. Although VIPS tries to follow the TIFF
specification carefully, you may have trouble reading this on any system
other than VIPS. 
<p>   im_vips2tiff fred.v fred.tif:jpeg:25,tile:64x64<br>
 
<p> Writes a highly compressed JPEG image, with a tile size of 64 by 64 pixels.

<p>   im_vips2tiff fred.v fred.tif:,tile<br>
 
<p> Writes an uncompressed tiled image. 
<p>   im_vips2tiff fred.v fred.tif:packbits,tile,,onebit<br>
 
<p> Writes a tiled one bit TIFF image (provided fred.v is a one band 8 bit
image) compressed with packbits. 
<p>   im_vips2tiff fred.v fred.tif:,,,,res_inch:300<br>
 
<p> Writes fred.v as a tiff file, with the resolution in the tiff header set
to 300 dpi. 
<p> 
<h2><a name='sect4' href='#toc4'>See Also</a></h2>
<a href='im_open.3.html'>im_open(3)</a>
 
<h2><a name='sect5' href='#toc5'>Copyright</a></h2>
Hey, you want this? You have it!
 <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'>Examples</a></li>
<li><a name='toc4' href='#sect4'>See Also</a></li>
<li><a name='toc5' href='#sect5'>Copyright</a></li>
</ul>
</body>
</html>