PHP 5 >= 5.5.0, PHP 7, PHP 8
imageaffinematrixget - Get an affine transformation matrix
Code Examples

imageaffinematrixget( int$type, array|float$options ): array|false

Returns an affine transformation matrix.



One of the IMG_AFFINE_* constants.


If type is IMG_AFFINE_TRANSLATE or IMG_AFFINE_SCALE, options has to be an array with keys x and y, both having float values.

If type is IMG_AFFINE_ROTATE, IMG_AFFINE_SHEAR_HORIZONTAL or IMG_AFFINE_SHEAR_VERTICAL, options has to be a float specifying the angle.

Return Values

An affine transformation matrix (an array with keys 0 to 5 and float values) or false on failure.

Related Functions

Example of imageaffinematrixget

Show all examples for imageaffinematrixget

PHP Version:

Function imageaffinematrixget:

Image Processing and GD Functions

Most used PHP functions