Top |
void | (*VipsInterpolateMethod) () |
void | vips_interpolate () |
VipsInterpolateMethod | vips_interpolate_get_method () |
int | vips_interpolate_get_window_size () |
int | vips_interpolate_get_window_offset () |
#define | VIPS_TRANSFORM_SHIFT |
#define | VIPS_TRANSFORM_SCALE |
#define | VIPS_INTERPOLATE_SHIFT |
#define | VIPS_INTERPOLATE_SCALE |
VipsInterpolate * | vips_interpolate_nearest_static () |
VipsInterpolate * | vips_interpolate_bilinear_static () |
VipsInterpolate * | vips_interpolate_new () |
void (*VipsInterpolateMethod) (VipsInterpolate *interpolate
,void *out
,VipsRegion *in
,double x
,double y
);
An interpolation function. It should read source pixels from in
with
VIPS_REGION_ADDR()
, it can look left and up from (x, y) by window_offset
pixels and it can access pixels in a window of size window_size
.
The interpolated value should be written to the pixel pointed to by out
.
See also: VipsInterpolateClass.
void vips_interpolate (VipsInterpolate *interpolate
,void *out
,VipsRegion *in
,double x
,double y
);
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.
You need to set in
and out
up correctly.
VipsInterpolateMethod
vips_interpolate_get_method (VipsInterpolate *interpolate
);
Look up the interpolate
method in the class and return it. Use this
instead of vips_interpolate()
to cache method dispatch.
int
vips_interpolate_get_window_size (VipsInterpolate *interpolate
);
Look up an interpolators desired window size.
int
vips_interpolate_get_window_offset (VipsInterpolate *interpolate
);
Look up an interpolators desired window offset.
#define VIPS_TRANSFORM_SHIFT (6)
Many of the vips interpolators use fixed-point arithmetic for coordinate calculation. This is how many bits of precision they use.
#define VIPS_TRANSFORM_SCALE (1 << VIPS_TRANSFORM_SHIFT)
VIPS_TRANSFORM_SHIFT as a multiplicative constant.
#define VIPS_INTERPOLATE_SHIFT (12)
Many of the vips interpolators use fixed-point arithmetic for value calcualtion. This is how many bits of precision they use.
#define VIPS_INTERPOLATE_SCALE (1 << VIPS_INTERPOLATE_SHIFT)
VIPS_INTERPOLATE_SHIFT as a multiplicative constant.
VipsInterpolate *
vips_interpolate_nearest_static (void
);
A convenience function that returns a nearest-neighbour interpolator you don't need to free.
VipsInterpolate *
vips_interpolate_bilinear_static (void
);
A convenience function that returns a bilinear interpolator you don't need to free.
VipsInterpolate *
vips_interpolate_new (const char *nickname
);
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.
See also: vips_type_find()
.