1IM_PNG(3)                  Library Functions Manual                  IM_PNG(3)
2
3
4

NAME

6       im_png2vips,  im_png2vips_header,  im_png2vips  - convert PNG images to
7       and from VIPS format
8

SYNOPSIS

10       #include <vips/vips.h>
11
12       int im_png2vips( const char *filename, IMAGE *out )
13
14       int im_png2vips_header( const char *filename, IMAGE *out )
15
16       int im_vips2png( IMAGE *in, const char *filename )
17
18

DESCRIPTION

20       im_png2vips() reads the png image in filename, and writes the image out
21       in VIPS format.
22
23       im_png2vips_header()  reads  just  the  header information from the PNG
24       file. You can't read any pixels!
25
26       im_vips2png() reads the image in and writes a PNG file to the specified
27       filename. The filename may include an optional mode string, following a
28       ':' character, which you can use to specify compression and interlace.
29
30       The mode string has the following syntax:
31
32         <compression>,<interlace>
33
34       where <compression> is an integer between 0 and 9 specifying the amount
35       of  compression  (6 is the default), and <interlace> is 0 for no inter‐
36       lace (this is the default) and 1 for ADAM7 interlace.
37
38       Beware that writing an interlaced image is potentially up  to  7  times
39       slower than writing a non-interlaced image.
40
41

EXAMPLES

43       The call:
44
45          im_vips2png fred.v fred.png
46
47       Writes a compression 6, uninterlaced PNG image.
48
49          im_vips2png fred.v fred.tif:,1
50
51       Writes an interlaced image.
52
53

SEE ALSO

55       im_ispng(3), im_vips2tiff(3)
56
58       Hey, you want this? You have it!
59
60
61
62                                  3 Jan 2003                         IM_PNG(3)
Impressum