Lucee Function Reference

imageshear()

Transforms an image by shearing it along one axis, creating a slanted or skewed effect. Positive values slant in one direction, negative values in the opposite direction.

Example

imageshear(any image,number shear,[string direction,[string interpolation]]):void

Category

image

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Default Value Description
image any  Yes   The source image to be sheared. The operation modifies this image directly.  
shear number  Yes   The shear factor to apply. Positive values slant forward, negative values backward. For example, 0.5 creates a 45-degree shear.  
direction string  No horizontal The axis along which to apply the shear:
  • horizontal (default): Shears along the x-axis, slanting vertical lines
  • vertical: Shears along the y-axis, slanting horizontal lines  
  • interpolation string  No nearest The interpolation method to use during transformation:
  • nearest (default): Fastest method but lowest quality, best for simple transformations
  • bilinear: Balanced between speed and quality, good for moderate shearing
  • bicubic: Highest quality but slowest, recommended for significant shearing