function image_imageinfo_cache_resize in Imageinfo Cache 7.3
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
File
- ./
imageinfo_cache.toolkit.inc, line 214 - Imageinfo Cache module. Pseudo image toolkit functions.
Code
function image_imageinfo_cache_resize($image, $width, $height) {
// Change toolkit back to the original value.
$image->toolkit = variable_get('image_toolkit_original', 'gd');
$return = image_toolkit_invoke('resize', $image, array(
$width,
$height,
));
// Change toolkit to the pseudo value again.
$image->toolkit = variable_get('image_toolkit', 'gd');
return $return;
}