function image_rotate
7.x image.inc | image_rotate(stdClass |
6.x image.inc | image_rotate($source, $destination, $degrees, $background = 0x000000) |
Rotates an image by the given number of degrees.
Parameters
$image: An image object returned by image_load().
$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 on success, FALSE on failure.
See also
Related topics
2 calls to image_rotate()
- ImageToolkitUnitTest::testRotate in drupal-7.x/
modules/ simpletest/ tests/ image.test - Test the image_rotate() function.
- image_rotate_effect in drupal-7.x/
modules/ image/ image.effects.inc - Image effect callback; Rotate an image resource.
3 string references to 'image_rotate'
- ImageAdminStylesUnitTest::testStyle in drupal-7.x/
modules/ image/ image.test - General test to add a style, add/remove/edit effects to it, then delete it.
- ImageDimensionsTestCase::testImageDimensions in drupal-7.x/
modules/ image/ image.test - Test styled image dimensions cumulatively.
- image_image_effect_info in drupal-7.x/
modules/ image/ image.effects.inc - Implements hook_image_effect_info().
File
- drupal-7.x/
includes/ image.inc, line 306 - API for manipulating images.
Code
function image_rotate(stdClass $image, $degrees, $background = NULL) {
return image_toolkit_invoke('rotate', $image, array($degrees, $background));
}