'checkbox', '#default_value' => (isset($data['upscale'])) ? $data['upscale'] : 0, '#title' => t('Allow Upscaling'), '#description' => t('Let scale make images larger than their original size'), ); return $form; } function theme_imagecache_scale($element) { return theme_imagecache_resize($element); } function imagecache_scale_image($image, $data) { // Set impossibly large values if the width and height aren't set. $data['width'] = $data['width'] ? $data['width'] : 9999999; $data['height'] = $data['height'] ? $data['height'] : 9999999; if (!$image = imageapi_image_scale($image, $data['width'], $data['height'], $data['upscale'])) { watchdog('imagecache', t('imagecache_scale_image failed. image: %image, data: %data.', array('%path' => $image, '%data' => print_r($data, TRUE))), WATCHDOG_ERROR); return FALSE; } return $image; } /** * Imagecache Scale and Crop */ function imagecache_scale_and_crop_form($data) { return imagecache_resize_form($data); } function theme_imagecache_scale_and_crop($element) { return theme_imagecache_resize($element); } function imagecache_scale_and_crop_image($image, $data) { // Set impossibly large values if the width and height aren't set. $data['width'] = $data['width'] ? $data['width'] : 9999999; $data['height'] = $data['height'] ? $data['height'] : 9999999; if (!$image = imageapi_image_scale_and_crop($image, $data['width'], $data['height'])) { watchdog('imagecache', t('imagecache_scale_and_crop failed. image: %image, data: %data.', array('%path' => $image, '%data' => print_r($data, TRUE))), WATCHDOG_ERROR); return FALSE; } return $image; } /** * Imagecache Deprecated Scale. * This will be removed in imagecache 2.1 */ function imagecache_deprected_scale_form($data) { $helptext = array(); $helptext['inside'] = t('Inside dimensions: Final dimensions will be less than or equal to the entered width and height. Useful for ensuring a maximum height and/or width.'); $helptext['outside'] = t('Outside dimensions: Final dimensions will be greater than or equal to the entered width and height. Ideal for cropping the result to a square.'); $description = '