Method
VipsImageppmsave
Declaration [src]
int
vips_ppmsave (
VipsImage* in,
const char* filename,
...
)
Description [src]
Write a VIPS image to a file as PPM.
It can write 1, 8, 16 or 32 bit unsigned integer images, float images, colour or monochrome, stored as binary or ASCII. Integer images of more than 8 bits can only be stored in ASCII.
When writing float (PFM) images the scale factor is set from the “pfm-scale” metadata.
Set ascii to TRUE to write as human-readable ASCII. Normally data is
written in binary.
Set bitdepth to 1 to write a one-bit image.
format defaults to the sub-type for this filename suffix.
::: tip “Optional arguments”
* format: VipsForeignPpmFormat, format to save in
* ascii: gboolean, save as ASCII rather than binary
* bitdepth: gint, bitdepth to save at
::: seealso
vips_image_write_to_file().