Skip to main content

Transform

Applies linear transformations to an image, such as scaling, rotation, skewing, or warping, altering its shape or orientation.

🖼️ Image options and parameters of transform method

transform method uses transformation matrix to rotate, translate, and/or scale the image. User needs to pass on the matrix that will be applied to the image. Matrix must have 2 rows and 3 columns:

[123abc]\begin{bmatrix} 1 & 2 & 3\\ a & b & c \end{bmatrix}

Where the first two columns are responsible for image rotation and shear, while last column is responsible for image translation.

caution

Matrix cannot be singular. Otherwise it cannot be inverted. Click here to learn more.

placeholderplaceholder
Ran in 0.00μs (Infinity ops/s)

Parameters and its default values

  • transformMatrix

  • options

Options

PropertyRequiredDefault value
borderTypenoconstant
borderValueno0
fullImageno-
heightno-
interpolationTypenobilinear
inverseno-
widthno-