im_ppm2vips_header(3)

im_ppm2vips_header3

Convert ppm/pgm/pbm images to and from vips format

Part of im_ppm2vips(3).

Usage

#include <vips/vips.h>

int im_ppm2vips( const char *filename, IMAGE *out )

int im_ppm2vips_header( const char *filename, IMAGE *out )

int im_vips2ppm( IMAGE *in, const char *filename )

Overview

im_ppm2vips() reads the PPM/PGM/PBM image in filename, and writes the image out in VIPS format. It can read 1, 8, 16 and 32 bit images, colour or monochrome, stored in binary or in ASCII. One bit images become 8 bit VIPS images, with 0 and 255 for 0 and 1.

im_ppm2vips_header() reads the just the header of the image into the VIPS image. You can't read any pixels!

im_vips2ppm() writes the VIPS image to the named file in PPM format. It can write 8, 16 or 32 bit integer images, colour or monochrome, stored as binary or ASCII. Images of more than 8 bits can only be stored in ASCII.

The storage format is indicated by a filename extension.

im_vips2ppm( im, "fred.ppm:ascii" )

will write to "fred.ppm" in ascii format. The default is binary.

Releases

Unchanged in 3 releases since Debian 3.1 (Sarge).

  1. 3.1–5.0

From libvips-dev 7.14.5-1 in Debian 5.0 (Lenny). Parsed by carta from the page's man source.