function image_rotate

7.x image.inc image_rotate(stdClass $image, $degrees, $background = NULL)
6.x image.inc image_rotate($source, $destination, $degrees, $background = 0x000000)

Rotate an image by the given number of degrees.

Parameters

$source: The file path of the source image.

$destination: The file path of the destination image.

$degrees: The number of (clockwise) degrees to rotate the image.

$background: An hexidecimal integer specifying the background color to use for the uncovered area of the image after the rotation. E.g. 0x000000 for black, 0xff00ff for magenta, and 0xffffff for white.

Return value

TRUE or FALSE, based on success.

Related topics

File

drupal-6.x/includes/image.inc, line 243
API for manipulating images.

Code

function image_rotate($source, $destination, $degrees, $background = 0x000000) {
  return image_toolkit_invoke('rotate', array($source, $destination, $degrees, $background));
}