next up previous contents
Next: 3.3 Projection functions Up: 3. The VImage class Previous: 3.1 Constructors   Contents

3.2 File conversion

VIPS can read and write a number of different file formats. Information about file format conversion is taken from the filename. For example:

VImage jim( "fred.jpg" );

This will decompress the file fred.jpg to a memory buffer, wrap a VIPS image around the buffer and build a reference to it called jim.

Options are passed to the file format converters embedded in the filename. For example:

VImage out( "jen.tif:deflate", "w" );

Writing to the descriptor out will cause a TIFF image to be written to disc with deflate compression.

See the manual page for im_open(3) for details of all the file formats and conversions available.



John Cupitt 2004-11-02