Home > PHP > Function > GD > imagerotate()

imagerotate()

imagerotate - Rotate an image with a given angle

Syntax

resource imagerotate (resource $image, float $angle, int $bgd_color, int $ignore_transparent)

Arguments

  • image - An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().
  • angle - Rotation angle, in degrees.
  • bgd_color - Specifies the color of the uncovered zone after the rotation
  • ignore_transparent - If set and non-zero, transparent colors are ignored (otherwise kept).

Description

Rotates the image image using the given angle in degrees.

Version

PHP 4.3.0, 5

Return value

Returns an image resource for the rotated image, or FALSE on failure.