Sophie

Sophie

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

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_JPEG2VIPS(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_jpeg2vips, im_vips2jpeg, im_vips2bufjpeg, im_vips2mimejpeg - convert
JPEG images to and from VIPS format 
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
#include &lt;vips/vips.h&gt; 
<p> int im_jpeg2vips(
char *filename, IMAGE *out )  
<p> int im_vips2jpeg( IMAGE *in, char *filename
) 
<p> int im_vips2bufjpeg( IMAGE *in, IMAGE *base, char **obuf, int *olen
) 
<p> int im_vips2mimejpeg( IMAGE *in ) 
<p> 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
<a href='im_jpeg2vips.3.html'><b>im_jpeg2vips(3)</a>
 </b> reads
the named jpeg file and writes it to the specified IMAGE. The entire image
is read before returning. It can read most 8-bit JPEG images, including CMYK.
 
<p> You can embed options in the filename. They have the form: 
<p>   filename.jpg:&lt;shrink-factor&gt;,&lt;fail&gt;<br>
 
<p> <b>shrink-factor </b> will shrink the image by that factor during read. Allowed
values are 1, 2, 4 and 8. Shrinking during read is very much faster than
decompressing the whole image and then shrinking. Example: 
<p>   fred.jpg:8<br>
 
<p> will return fred.jpg shrink by a factor of 8. 
<p> <b>fail</b> makes the JPEG reader
fail on any warnings. This can be useful for detecting truncated files,
for example: normally reading these produces a warning, but no fatal error.
 Example: 
<p>   fred.jpg:,fail<br>
 
<p> will read fred.jpg, failing with a fatal error if the file has been truncated.

<p> Any embedded ICC profiles are ignored: you always just get the RGB from
the file. Instead, the embedded profile will be attached to the image as
metadata. Any EXIF data is also attached as VIPS metadata. 
<p> <a href='im_vips2jpeg.3.html'><b>im_vips2jpeg(3)</a>

</b> writes the IMAGE to filename in JPEG format. It uses the default settings
of the IJG library.  
<p> A compression factor may be encoded in the filename:
for example, "fred.jpg" will write with the default compression factor (75),
"fred.jpg:25" will write with factor 25. 
<p> An ICC profile may also be specified.
For example, "fred.jpg:25,/home/john/srgb.icc" will embed the profile stored
in the file "/home/john/srgb.icc" into the JPEG image. This does not affect
the pixels which are written; just the way they are tagged.  
<p> If no profile
is specified in the save string and the VIPS header contains an  ICC profile
named IM_META_ICC_NAME ("icc-profile-data"), the profile from the header
will be attached. 
<p> The image is automatically converted to RGB or Monochrome
before saving. Any metadata attached to the image is saved as EXIF, if possible.

<p> <a href='im_vips2bufjpeg.3.html'><b>im_vips2bufjpeg(3)</a>
 </b> returns the compressed image in a memory buffer. The
buffer is allocated for you, local to IMAGE descriptor  <b>base. </b> The size
of the allocated buffer is returned in the  <b>olen </b> parameter. You are responsible
for freeing the buffer. The buffer is only allocated if the function returns
successfully. 
<p> <a href='im_vips2mimejpeg.3.html'><b>im_vips2mimejpeg(3)</a>
 </b> writes the image to stdout as a MIME
image/jpeg type. It outputs Content-Length and Content-Type fields making
the result suitable for sending to a web browser. 
<p> 
<h2><a name='sect3' href='#toc3'>See Also</a></h2>
<a href='im_open.3.html'>im_open(3)</a>
.  <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'>See Also</a></li>
</ul>
</body>
</html>