function ImageToolkitInterface::resize

Scales an image to the specified size.

Parameters

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

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

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

Return value

bool TRUE or FALSE, based on success.

See also

image_resize()

2 methods override ImageToolkitInterface::resize()
GDToolkit::resize in drupal/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/GDToolkit.php
Implements \Drupal\system\Plugin\ImageToolkitInterface::resize().
TestToolkit::resize in drupal/core/modules/system/tests/modules/image_test/lib/Drupal/image_test/Plugin/ImageToolkit/TestToolkit.php
Implements \Drupal\system\Plugin\ImageToolkitInterface::resize().

File

drupal/core/modules/system/lib/Drupal/system/Plugin/ImageToolkitInterface.php, line 48
Contains \Drupal\system\Plugin\ImageToolkitInterface.

Class

ImageToolkitInterface
Defines an interface for image toolkits.

Namespace

Drupal\system\Plugin

Code

function resize($image, $width, $height);