Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

imagesetinterpolation(3) [php man page]

IMAGESETINTERPOLATION(3)						 1						  IMAGESETINTERPOLATION(3)

imagesetinterpolation - Set the interpolation method

SYNOPSIS
bool imagesetinterpolation (resource $image, [int $method = IMG_BILINEAR_FIXED]) DESCRIPTION
Sets the interpolation method, setting an interpolation method affects the rendering of various functions in GD, such as the imagero- tate(3) function. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $method - The interpolation method, which can be one of the following: o IMG_BELL: Bell filter. o IMG_BESSEL: Bessel filter. o IMG_BICUBIC: Bicubic interpolation. o IMG_BICUBIC_FIXED: Fixed point implementation of the bicubic interpolation. o IMG_BILINEAR_FIXED: Fixed point implementation of the bilinear interpolation ( default (also on image creation)). o IMG_BLACKMAN: Blackman window function. o IMG_BOX: Box blur filter. o IMG_BSPLINE: Spline interpolation. o IMG_CATMULLROM: Cubic Hermite spline interpolation. o IMG_GAUSSIAN: Gaussian function. o IMG_GENERALIZED_CUBIC: Generalized cubic spline fractal interpolation. o IMG_HERMITE: Hermite interpolation. o IMG_HAMMING: Hamming filter. o IMG_HANNING: Hanning filter. o IMG_MITCHELL: Mitchell filter. o IMG_POWER: Power interpolation. o IMG_QUADRATIC: Inverse quadratic interpolation. o IMG_SINC: Sinc function. o IMG_NEAREST_NEIGHBOUR: Nearest neighbour interpolation. o IMG_WEIGHTED4: Weighting filter. o IMG_TRIANGLE: Triangle interpolation. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 imagesetinterpolation(3) example <?php // Load an image $im = imagecreate(500, 500); // By default interpolation is IMG_BILINEAR_FIXED, switch // to use the 'Mitchell' filter: imagesetinterpolation($im, IMG_MITCHELL); // Continue to work with $im ... ?> NOTES
Changing the interpolation method affects the following functions when rendering: oimageaffine(3) oimagerotate(3) oimagescale(3) PHP Documentation Group IMAGESETINTERPOLATION(3)

Check Out this Related Man Page

mlib_ImageAffineTable_Fp(3MLIB) 			    mediaLib Library Functions				   mlib_ImageAffineTable_Fp(3MLIB)

NAME
mlib_ImageAffineTable_Fp - affine transformation on an image with table-driven interpolation SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_ImageAffineTable_Fp(mlib_image *dst, const mlib_image *src, const mlib_d64 *mtx, const void *interp_table, mlib_edge edge); DESCRIPTION
The mlib_ImageAffineTable_Fp() function does affine transformation on a floating-point image with table-driven interpolation. The following equation represents the affine transformation: xd = a*xs + b*ys + tx yd = c*xs + d*ys + ty where a point with coordinates (xs, ys) in the source image is mapped to a point with coordinates (xd, yd) in the destination image. The data type of the images can be MLIB_FLOAT or MLIB_DOUBLE. The width and height of the destination image can be different from the width and height of the source image. The center of the upper-left corner pixel of an image is located at (0.5, 0.5). PARAMETERS
The function takes the following arguments: dst Pointer to destination image. src Pointer to source image. mtx Transformation matrix. mtx[0] holds a; mtx[1] holds b; mtx[2] holds tx; mtx[3] holds c; mtx[4] holds d; mtx[5] holds ty. interp_table Pointer to an interpolation table. The table is created by the mlib_ImageInterpTableCreate() function. edge Type of edge condition. It can be one of the following: MLIB_EDGE_DST_NO_WRITE MLIB_EDGE_DST_FILL_ZERO MLIB_EDGE_OP_NEAREST MLIB_EDGE_SRC_EXTEND MLIB_EDGE_SRC_PADDED RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_ImageInterpTableCreate(3MLIB), mlib_ImageInterpTableDelete(3MLIB), mlib_ImageAffineTable(3MLIB), mlib_ImageAffine(3MLIB), mlib_ImageAffine_Fp(3MLIB), attributes(5) SunOS 5.10 10 Nov 2004 mlib_ImageAffineTable_Fp(3MLIB)
Man Page