VipsInterpolate

VipsInterpolate — various interpolators: nearest, bilinear, bicubic, and some non-linear

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <vips/vips.h>

                    VipsInterpolate;
void                (*VipsInterpolateMethod)            (VipsInterpolate *Param1,
                                                         PEL *out,
                                                         REGION *in,
                                                         double x,
                                                         double y);
                    VipsInterpolateClass;
void                vips_interpolate                    (VipsInterpolate *interpolate,
                                                         PEL *out,
                                                         REGION *in,
                                                         double x,
                                                         double y);
VipsInterpolateMethod  vips_interpolate_get_method      (VipsInterpolate *Param1);
int                 vips_interpolate_get_window_size    (VipsInterpolate *interpolate);
int                 vips_interpolate_get_window_offset  (VipsInterpolate *interpolate);
#define             VIPS_TRANSFORM_SHIFT
#define             VIPS_TRANSFORM_SCALE
#define             VIPS_INTERPOLATE_SHIFT
#define             VIPS_INTERPOLATE_SCALE
VipsInterpolate *   vips_interpolate_nearest_static     (void);
VipsInterpolate *   vips_interpolate_bilinear_static    (void);
VipsInterpolate *   vips_interpolate_bicubic_static     (void);
VipsInterpolate *   vips_interpolate_new                (const char *nickname);
void                vips__interpolate_init              (void);

Object Hierarchy

  GObject
   +----VipsObject
         +----VipsInterpolate

Description

A number of image interpolators.

Details

VipsInterpolate

typedef struct _VipsInterpolate VipsInterpolate;

VipsInterpolateMethod ()

void                (*VipsInterpolateMethod)            (VipsInterpolate *Param1,
                                                         PEL *out,
                                                         REGION *in,
                                                         double x,
                                                         double y);

VipsInterpolateClass

typedef struct {
	VipsObjectClass parent_class;

	/* Write to pixel out(x,y), interpolating from in(x,y). The caller has
	 * to set the regions up.
	 */
	VipsInterpolateMethod interpolate;

	/* This interpolator needs a window this many pixels across and down.
	 */
	int (*get_window_size)( VipsInterpolate * );

	/* Or just set this if you want a constant.
	 */
	int window_size;

	/* Stencils are offset by this much. Default to window_size / 2 - 1
	 * (centering) if get_window_offset is NULL and window_offset is -1.
	 */
	int (*get_window_offset)( VipsInterpolate * );
	int window_offset;
} VipsInterpolateClass;

vips_interpolate ()

void                vips_interpolate                    (VipsInterpolate *interpolate,
                                                         PEL *out,
                                                         REGION *in,
                                                         double x,
                                                         double y);

vips_interpolate_get_method ()

VipsInterpolateMethod  vips_interpolate_get_method      (VipsInterpolate *Param1);

vips_interpolate_get_window_size ()

int                 vips_interpolate_get_window_size    (VipsInterpolate *interpolate);

vips_interpolate_get_window_offset ()

int                 vips_interpolate_get_window_offset  (VipsInterpolate *interpolate);

VIPS_TRANSFORM_SHIFT

#define VIPS_TRANSFORM_SHIFT (6)

VIPS_TRANSFORM_SCALE

#define VIPS_TRANSFORM_SCALE (1 << VIPS_TRANSFORM_SHIFT)

VIPS_INTERPOLATE_SHIFT

#define VIPS_INTERPOLATE_SHIFT (12)

VIPS_INTERPOLATE_SCALE

#define VIPS_INTERPOLATE_SCALE (1 << VIPS_INTERPOLATE_SHIFT)

vips_interpolate_nearest_static ()

VipsInterpolate *   vips_interpolate_nearest_static     (void);

vips_interpolate_bilinear_static ()

VipsInterpolate *   vips_interpolate_bilinear_static    (void);

vips_interpolate_bicubic_static ()

VipsInterpolate *   vips_interpolate_bicubic_static     (void);

vips_interpolate_new ()

VipsInterpolate *   vips_interpolate_new                (const char *nickname);

vips__interpolate_init ()

void                vips__interpolate_init              (void);