Resizes an image to the given dimensions (ignoring aspect ratio).
object $image: An image object returned by image_load().
int $width: The target width, in pixels.
int $height: The target height, in pixels.
bool TRUE on success, FALSE on failure.
\Drupal\system\Plugin\ImageToolkitInterface::resize()
function image_resize($image, $width, $height) {
$width = (int) round($width);
$height = (int) round($height);
return $image->toolkit
->resize($image, $width, $height);
}