ImageShear

Shears an image either horizontally or vertically.

ImageShear( image, shear [, direction [, interpolation ] ] )

Returns: void

Argument Description Default
image
any, required

The image on which this operation is performed.

Alias: name, source

shear
number, required

Shear value. Coordinates can be integers or real numbers.

direction
string, optional

Shear direction:

  • horizontal (default)
  • vertical

horizontal

interpolation
string, optional

Type of interpolation:

  • nearest (default): Applies the nearest neighbor method of interpolation. Image quality is lower than the other interpolation methods, but processing is fastest.
  • bilinear: Applies the bilinear method of interpolation. The quality of the image is less pixelated than the default, but processing is slower.
  • bicubic: Applies the bicubic method of interpolation. Generally, the quality of image is highest with this method and processing is slowest.

nearest

Examples

myImg = imageNew("",100,50,"rgb","B33771");
imageShear(myImg,4,"vertical");
cfimage(action="writeToBrowser", source=myImg);

See also