English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Basic PHP Tutorial

Advanced PHP Tutorial

PHP & MySQL

PHP Reference Manual

PHP imageaffine() function usage and examples of returning the image after affine transformation

PHP Image Processing

imageaffine — Returns the image after affine transformation, with an optional clipping area.

Syntax

resource imageaffine (resource $image, array $affine[, array $clip])

parameters

  • imageimage resource returned by the image creation function (e.g., imagecreatetruecolor()).

  • affineAn array with keys from 0 to 5 number.

  • clipAn array with keys "x", "y", "width", and "height".

Return value

If successful, returns the image after affine transformation, or FALSE in case of failure.

PHP Image Processing