libvips/man/im_quantim.3

54 lines
1.5 KiB
Groff

.TH IM_QUANTIM 3 "10 May 1991"
.SH NAME
im_quantim, im_quantlut, im_spatres \- quantise an image or a lut
.SH SYNOPSIS
.B #include <vips/vips.h>
.B int im_quantim(in, out, no_of_bits)
.br
.B IMAGE *in, *out;
.br
.B int no_of_bits;
.B int im_quantlut(lut, no_of_bits)
.br
.B IMAGE *lut;
.br
.B int no_of_bits;
.B int im_spatres(in, out, step)
.br
.B IMAGE *in, *out;
.br
.B int step;
.SH DESCRIPTION
.B im_quantim()
quantises the image file held by in using no_of_bits and writes the result to
out. The no_of_bits should be between 1 and 7 inclusive. Input can have any
number of bands. The function expects as input a valid unsigned char image.
These functions are here for compatibility only. You should use the boolean
operations im_andconst(3), im_orconst(3), im_shrink(3), im_zoom(3) and
im_lowpass(3).
.B im_quantlut()
creates an one band unsigned char
lookup table which is used by im_quantim(3).
The no_of_bits should be between 1 and 7 inclusive.
.B im_spatres()
reduces the spatial resolution of in by averaging step*step pixels
and replicating the result in out. The function can be used in
order to show the effect of reducing the spatial resolution of a given image
and the importance of post-filtering before displaying.
Input can have any number of bands.
.SH RETURN VALUE
All functions returns 0 on success and -1 on error.
.SH SEE ALSO
im_andconst(3), im_orconst(3), im_shrink(3), im_zoom(3) im_lowpass(3).
.SH COPYRIGHT
.br
N. Dessipris
.SH AUTHOR
N. Dessipris \- 10/05/1991