Class
VipsInterpolate
Description [src]
abstract class Vips.Interpolate : Vips.Object
{
/* No available fields */
}
An abstract base class for the various interpolation functions.
Use vips --list classes to see all the interpolators available.
An interpolator consists of a function to perform the interpolation, plus some extra data fields which tells libvips how to call the function and what data it needs.
Constructors
vips_interpolate_new
Look up an interpolator from a nickname and make one. You need to free the
result with g_object_unref() when you’re done with it.
Functions
vips_interpolate_bilinear_static
A convenience function that returns a bilinear interpolator you don’t need to free.
vips_interpolate_nearest_static
A convenience function that returns a nearest-neighbour interpolator you don’t need to free.
Instance methods
vips_interpolate
Look up the interpolate method in the class and call it. Use
vips_interpolate_get_method() to get a direct pointer to the function and
avoid the lookup overhead.
vips_interpolate_get_method
Look up the interpolate method in the class and return it. Use this
instead of vips_interpolate() to cache method dispatch.
Methods inherited from VipsObject (27)
Please see VipsObject for a full list of methods.
Properties
Properties inherited from VipsObject (2)
Signals
Signals inherited from VipsObject (4)
VipsObject::close
The ::close signal is emitted once during object close. The object is dying and may not work.
VipsObject::postbuild
The ::postbuild signal is emitted once just after successful object construction. Return non-zero to cause object construction to fail.
VipsObject::postclose
The ::postclose signal is emitted once after object close. The object pointer is still valid, but nothing else.
VipsObject::preclose
The ::preclose signal is emitted once just before object close starts. The object is still alive.
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct VipsInterpolateClass {
VipsObjectClass parent_class;
VipsInterpolateMethod interpolate;
int (* get_window_size) (
VipsInterpolate* interpolate
);
int window_size;
int (* get_window_offset) (
VipsInterpolate* interpolate
);
int window_offset;
}
window_size is the size of the window that the interpolator needs. For
example, a bicubic interpolator needs to see a window of 4x4 pixels to be
able to interpolate a value.
You can either have a function in get_window_size which returns the window
that a specific interpolator needs, or you can leave get_window_size NULL
and set a constant value in window_size.
window_offset is how much to offset the window up and left of (x, y). For
example, a bicubic interpolator will want an window_offset of 1.
You can either have a function in get_window_offset which returns the
offset that a specific interpolator needs, or you can leave
get_window_offset NULL and set a constant value in window_offset.
You also need to set VipsObject:nickname and
VipsObject:description in VipsObject.
Class members
parent_class: VipsObjectClassNo description available.
interpolate: VipsInterpolateMethodThe interpolation method.
get_window_size: int (* get_window_size) ( VipsInterpolate* interpolate )Return the size of the window needed by this method.
window_size: intOr just set this for a constant window size.
get_window_offset: int (* get_window_offset) ( VipsInterpolate* interpolate )Return the window offset for this method.
window_offset: intOr just set this for a constant window offset.