You are here

function image_imagemagick_resize in ImageMagick 7

Scales an image to the specified size.

Parameters

$image: An image object. The $image->resource, $image->info['width'], and $image->info['height'] values will be modified by this call.

$width: The new width of the resized image, in pixels.

$height: The new height of the resized image, in pixels.

Return value

TRUE or FALSE, based on success.

See also

image_resize()

File

./imagemagick.module, line 203
Provides ImageMagick integration.

Code

function image_imagemagick_resize(stdClass $image, $width, $height) {
  $image->ops[] = '-resize ' . (int) $width . 'x' . (int) $height . '!';
  $image->info['width'] = $width;
  $image->info['height'] = $height;
  return TRUE;
}