function imageapi_image_rotate in ImageAPI 6
Same name and namespace in other branches
- 5 imageapi.module \imageapi_image_rotate()
Rotate an image by the given number of degrees.
Parameters
$image: An image object returned by imageapi_image_open().
$degrees: The number of (clockwise) degrees to rotate the image.
$background: An hexadecimal 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. For images that support transparency, this will default to transparent. Otherwise it will be white.
Return value
TRUE or FALSE, based on success.
File
- ./
imageapi.module, line 284 - An ImageAPI supporting additional image plugins as modules. Images are treated as objects, and images are not written per manipulation as Drupal's core image handling works.
Code
function imageapi_image_rotate(&$image, $degrees, $background = NULL) {
return imageapi_toolkit_invoke('rotate', $image, array(
$degrees,
$background,
));
}