Browse Source

Add support pil_options.

master
Alexander Demidov 11 years ago
parent
commit
6dd4b9860c
  1. 3
      Upload.class.php

3
Upload.class.php

@ -67,8 +67,9 @@ abstract class Upload
$image->variants[$size] = $image_variant;
if (Config::get('PYTHON_PIL_RESIZE')) {
$script_file_path = Config::get('PYTHON_PIL_RESIZE')->script_file_path;
$pil_options = isset(Config::get('PYTHON_PIL_RESIZE')->pil_options) ? implode(' ', Config::get('PYTHON_PIL_RESIZE')->pil_options) . ' ' : '';
ob_start();
exec($script_file_path . ' --width=' . $size_parts[0] . ' --height=' . $size_parts[1] . ' ' . self::getFilePath($image) . ' ' . self::getFilePath($image_variant));
exec($script_file_path . ' --width=' . $size_parts[0] . ' --height=' . $size_parts[1] . ' ' . $pil_options . self::getFilePath($image) . ' ' . self::getFilePath($image_variant));
ob_clean();
}
}

Loading…
Cancel
Save