<!-- manual page source format generated by PolyglotMan v3.2, --> <!-- available at http://polyglotman.sourceforge.net/ --> <html> <head> <title>VIPS_INTERPOLATE(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> VipsInterpolate, vips_interpolate, vips_interpolate_get_method, vips_interpolate_get_window_size - base class for VIPS interpolators <h2><a name='sect1' href='#toc1'>Synopsis</a></h2> #include <vips/vips.h> <p> typedef void (*VipsInterpolateMethod)( VipsInterpolate *, <br> PEL *out, REGION *in, double x, double y );<br> <p> typedef struct _VipsInterpolateClass { <br> VipsObjectClass parent_class;<br> <p> VipsInterpolateMethod interpolate;<br> <br> int (*get_window_size)( VipsInterpolate * );<br> <br> int window_size;<br> <br> } VipsInterpolateClass; <p> void vips_interpolate( VipsInterpolate *interpolate, <br> PEL *out, REGION *in, double x, double y );<br> <br> VipsInterpolateMethod vips_interpolate_get_method( VipsInterpolate * ); <br> int vips_interpolate_get_window_size( VipsInterpolate *interpolate ); <p> VipsInterpolate *vips_interpolate_nearest_static( void ); <br> VipsInterpolate *vips_interpolate_bilinear_static( void ); <br> VipsInterpolate *vips_interpolate_bicubic_static( void ); <p> VipsInterpolate *vips_interpolate_new( const char *nickname ); <p> <h2><a name='sect2' href='#toc2'>Description</a></h2> <b>VipsInterpolate</b> is the base class for VIPS interpolators. It provides a simple framework that subclasses use to implement the various interpolators that VIPS ships with. You can add new interpolators by subclassing <b>VipsInterpolated</b> and implementing an <b>interpolate</b> method. You can use any interpolator in your code via the methods of <b>VipsInterpolate.</b> <p> <a href='vips_interpolate.3.html'><b>vips_interpolate(3)</b></a> looks up the interpolate method for the object and calls it for you. <p> <a href='vips_interpolate_get_method.3.html'><b>vips_interpolate_get_method(3)</b></a> just does the lookup and returns a pointer to the interpolate function. You can use this to take the lookup out of an inner loop. <p> <a href='vips_interpolate_get_window_size.3.html'><b>vips_interpolate_get_window_size(3)</b></a> either calls <b>get_window_size()</b> or if it is NULL, returns <b>window_size.</b> <p> <a href='vips_interpolate_nearest_static.3.html'><b>vips_interpolate_nearest_static(3)</a> ,</b> <a href='vips_interpolate_bilinear_static.3.html'><b>vips_interpolate_bilinear_static(3)</b></a> and <a href='vips_interpolate_bicubic_static.3.html'><b>vips_interpolate_bicubic_static(3)</b></a> are convenience functions which return a pointer to a static instance of a nearest-neighbour, bilinear and bicubic interpolator. You can pass these to any function which needs a <b>VipsInterpolator</b> as an argument. No need to free the result. <p> <a href='vips_interpolate_new.3.html'><b>vips_interpolate_new(3)</b></a> is a convenience function which makes an interpolator from a nickname. Free the result with <a href='g_object_unref.3.html'><b>g_object_unref(3)</b></a> when you’re done with it. <p> <h2><a name='sect3' href='#toc3'>Supported Interpolators</a></h2> <p> <p>You can list the supported interpolators with <p> $ vips --list classes<br> <p> look for subclasses of <b>VipsInterpolate.</b> <p> <h2><a name='sect4' href='#toc4'>Return Value</a></h2> Unless otherwise noted, functions return 0 success and -1 on error. <h2><a name='sect5' href='#toc5'>See Also</a></h2> <a href='VipsObject.3.html'>VipsObject(3)</a> , <a href='VipsInterpolate.3.html'>VipsInterpolate(3)</a> , <a href='vips_type_find.3.html'>vips_type_find(3)</a> , <a href='vips.1.html'>vips(1)</a> . <h2><a name='sect6' href='#toc6'>Author</a></h2> John Cupitt <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'>Supported Interpolators</a></li> <li><a name='toc4' href='#sect4'>Return Value</a></li> <li><a name='toc5' href='#sect5'>See Also</a></li> <li><a name='toc6' href='#sect6'>Author</a></li> </ul> </body> </html>