Definition

image_resize($source, $destination, $width, $height)
drupal/includes/image.inc, line 222

Description

Resize an image to the given dimensions (ignoring aspect ratio).

Parameters

$source The file path of the source image.

$destination The file path of the destination image.

$width The target width, in pixels.

$height The target height, in pixels.

  • @return TRUE or FALSE, based on success.

Related topics

Namesort iconDescription
Image toolkitsDrupal's image toolkits provide an abstraction layer for common image file manipulations like scaling, cropping, and rotating. The abstraction frees module authors from the need to support multiple image libraries, and it allows site...

Code

function image_resize($source, $destination, $width, $height) {
  return image_toolkit_invoke('resize', array($source, $destination, $width, $height));
}