Rotates an image by the given number of degrees.
$image: An image object returned by image_load().
int $degrees: The number of (clockwise) degrees to rotate the image.
string $background: (optional) 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.
bool TRUE on success, FALSE on failure.
\Drupal\system\Plugin\ImageToolkitInterface::rotate()
function image_rotate($image, $degrees, $background = NULL) {
return $image->toolkit
->rotate($image, $degrees, $background);
}