function _media_crop_apply_scale in Media crop 7
Helper function to apply scale to an image.
Parameters
int $scale_width: Width of image scale.
int $scale_height: Height of image scale.
object $image: Image object to modify.
1 call to _media_crop_apply_scale()
- media_crop_create_derivative in ./
media_crop.module - Helper function to create a derivative of an image.
File
- ./
media_crop.module, line 829 - Media crop primary module file.
Code
function _media_crop_apply_scale($scale_width, $scale_height, $image) {
if ($scale_width || $scale_height) {
$scale_width = (int) $scale_width === 0 ? NULL : (int) $scale_width;
$scale_height = (int) $scale_height === 0 ? NULL : (int) $scale_height;
image_scale($image, $scale_width, $scale_height, TRUE);
}
}