You are here

function image_imagemagick_rotate in Image 5

Same name and namespace in other branches
  1. 5.2 image.imagemagick.inc \image_imagemagick_rotate()
  2. 6 image.imagemagick.inc \image_imagemagick_rotate()
  3. 7 image.imagemagick.inc \image_imagemagick_rotate()

Rotate an image.

File

./image.imagemagick.inc, line 103

Code

function image_imagemagick_rotate($source, $dest, $degrees, $bg_color = 0x0) {
  $args = array(
    'rotate' => '-rotate ' . (double) $degrees,
    'background' => '-background #' . str_pad(dechex($bg_color), 6, 0),
  );
  $args = _image_imagemagick_alter_invoke('rotate', $source, $args);
  return _image_imagemagick_convert($source, $dest, $args);
}