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)

Kinds of images compatible with algorithm​

Image propertyWhat it meansPossible values
bitDepthnumber of bits per channel[8,16]
componentsnumber of componentsany
alphais alpha channel allowedtrue

Parameters and its default values​

  • transformMatrix

  • options

Options​

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