<!-- manual page source format generated by PolyglotMan v3.2, --> <!-- available at http://polyglotman.sourceforge.net/ --> <html> <head> <title>IM_QUANTIM(3) manual page</title> </head> <body bgcolor='white'> <a href='#toc'>Table of Contents</a><p> <h2><a name='sect0' href='#toc0'>Name</a></h2> im_quantim, im_quantlut, im_spatres - quantise an image or a lut <h2><a name='sect1' href='#toc1'>Synopsis</a></h2> <b>#include <vips/vips.h></b> <p> <b>int im_quantim(in, out, no_of_bits)</b> <br> <b>IMAGE *in, *out;</b> <br> <b>int no_of_bits;</b> <p> <b>int im_quantlut(lut, no_of_bits)</b> <br> <b>IMAGE *lut;</b> <br> <b>int no_of_bits;</b> <p> <b>int im_spatres(in, out, step)</b> <br> <b>IMAGE *in, *out;</b> <br> <b>int step;</b> <h2><a name='sect2' href='#toc2'>Description</a></h2> <b>im_quantim()</b> 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. <p> These functions are here for compatibility only. You should use the boolean operations <a href='im_andconst.3.html'>im_andconst(3)</a> , <a href='im_orconst.3.html'>im_orconst(3)</a> , <a href='im_shrink.3.html'>im_shrink(3)</a> , <a href='im_zoom.3.html'>im_zoom(3)</a> and <a href='im_lowpass.3.html'>im_lowpass(3)</a> . <p> <b>im_quantlut()</b> creates an one band unsigned char lookup table which is used by <a href='im_quantim.3.html'>im_quantim(3)</a> . The no_of_bits should be between 1 and 7 inclusive. <p> <b>im_spatres()</b> 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. <h2><a name='sect3' href='#toc3'>Return Value</a></h2> All functions returns 0 on success and -1 on error. <h2><a name='sect4' href='#toc4'>See Also</a></h2> <a href='im_andconst.3.html'>im_andconst(3)</a> , <a href='im_orconst.3.html'>im_orconst(3)</a> , <a href='im_shrink.3.html'>im_shrink(3)</a> , <a href='im_zoom.3.html'>im_zoom(3)</a> <a href='im_lowpass.3.html'>im_lowpass(3)</a> . <h2><a name='sect5' href='#toc5'>Copyright</a></h2> <br> N. Dessipris <h2><a name='sect6' href='#toc6'>Author</a></h2> N. Dessipris - 10/05/1991 <p> <hr><p> <a name='toc'><b>Table of Contents</b></a><p> <ul> <li><a name='toc0' href='#sect0'>Name</a></li> <li><a name='toc1' href='#sect1'>Synopsis</a></li> <li><a name='toc2' href='#sect2'>Description</a></li> <li><a name='toc3' href='#sect3'>Return Value</a></li> <li><a name='toc4' href='#sect4'>See Also</a></li> <li><a name='toc5' href='#sect5'>Copyright</a></li> <li><a name='toc6' href='#sect6'>Author</a></li> </ul> </body> </html>