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:
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.
Kinds of images compatible with algorithmâ
Image property | What it means | Possible values |
---|---|---|
bitDepth | number of bits per channel | [8,16] |
components | number of components | any |
alpha | is alpha channel allowed | true |
Parameters and its default valuesâ
-
transformMatrix
-
options
Optionsâ
Property | Required | Default value |
---|---|---|
borderType | no | constant |
borderValue | no | 0 |
fullImage | no | - |
height | no | - |
interpolationType | no | bilinear |
inverse | no | - |
width | no | - |