Community Documentation

image_resize

5 image.inc image_resize($source, $destination, $width, $height)
6 image.inc image_resize($source, $destination, $width, $height)
7 image.inc image_resize(stdClass $image, $width, $height)
8 image.inc image_resize(stdClass $image, $width, $height)

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 value

TRUE or FALSE, based on success.

Related topics

File

includes/image.inc, line 223
API for manipulating images.

Code

<?php
function image_resize($source, $destination, $width, $height) {
  return image_toolkit_invoke('resize', array($source, $destination, $width, $height));
}
?>
Login or register to post comments