You are here

function _imagefield_crop_scale_image in Imagefield Crop 5

1 call to _imagefield_crop_scale_image()
_imagefield_crop_widget_prepare_form_values in ./imagefield_crop.module

File

./imagefield_crop.module, line 664

Code

function _imagefield_crop_scale_image($file, $field) {
  if ($field['widget']['use_unscaled'] && $file['filepath'] != NULL) {
    $unscaled = $file['filepath'];
    file_copy($unscaled, $file['filepath'] . '.unscaled', FILE_EXISTS_REPLACE);
  }
  $file = _imagefield_scale_image($file, $field['widget']['croparea']);
  return $file;
}