Top |
Functions
Types and Values
#define | VIPS_TRANSFORM_SHIFT |
#define | VIPS_TRANSFORM_SCALE |
#define | VIPS_INTERPOLATE_SHIFT |
#define | VIPS_INTERPOLATE_SCALE |
Functions
VipsInterpolateMethod ()
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.
vips_interpolate ()
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.
[skip]
vips_interpolate_get_method ()
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.
[skip]
vips_interpolate_get_window_size ()
int
vips_interpolate_get_window_size (VipsInterpolate *interpolate
);
Look up an interpolators desired window size.
vips_interpolate_get_window_offset ()
int
vips_interpolate_get_window_offset (VipsInterpolate *interpolate
);
Look up an interpolators desired window offset.
vips_interpolate_nearest_static ()
VipsInterpolate *
vips_interpolate_nearest_static (void
);
A convenience function that returns a nearest-neighbour interpolator you don't need to free.
vips_interpolate_bilinear_static ()
VipsInterpolate *
vips_interpolate_bilinear_static (void
);
A convenience function that returns a bilinear interpolator you don't need to free.
vips_interpolate_new ()
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()
.
[constructor]
Types and Values
VIPS_TRANSFORM_SHIFT
#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.
VIPS_TRANSFORM_SCALE
#define VIPS_TRANSFORM_SCALE (1 << VIPS_TRANSFORM_SHIFT)
VIPS_TRANSFORM_SHIFT as a multiplicative constant.
VIPS_INTERPOLATE_SHIFT
#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.
VIPS_INTERPOLATE_SCALE
#define VIPS_INTERPOLATE_SCALE (1 << VIPS_INTERPOLATE_SHIFT)
VIPS_INTERPOLATE_SHIFT as a multiplicative constant.