function _imagefield_crop_resize in Imagefield Crop 6
Same name and namespace in other branches
- 5 imagefield_crop.module \_imagefield_crop_resize()
- 7.3 imagefield_crop.module \_imagefield_crop_resize()
- 7 imagefield_crop.module \_imagefield_crop_resize()
- 7.2 imagefield_crop.module \_imagefield_crop_resize()
2 calls to _imagefield_crop_resize()
- imagefield_crop_recrop in ./
imagefield_crop.drush.inc - Utility function used if you want to recrop all images in a specific node. This might be useful if you want to reprocess your nodes using a different toolkit, or a different toolkit configuration
- imagefield_crop_widget_value in ./
imagefield_crop_widget.inc
File
- ./
imagefield_crop_widget.inc, line 318
Code
function _imagefield_crop_resize($src, $crop = NULL, $scale = NULL, $dst = '') {
$image = imageapi_image_open($src);
if ($image) {
if ($crop) {
imageapi_image_crop($image, $crop['x'], $crop['y'], $crop['width'], $crop['height']);
}
if ($scale) {
imageapi_image_scale_and_crop($image, $scale['width'], $scale['height']);
}
$result = imageapi_image_close($image, $dst);
}
return $result;
}