Correct upload with python pil paste. Add Image::getWatermark()

This commit is contained in:
Alexander Demidov
2013-12-26 23:06:16 +04:00
parent 58e21bf88c
commit 377d78128f
2 changed files with 17 additions and 0 deletions

View File

@ -79,6 +79,16 @@ abstract class Upload
. ' ' . self::getFilePath($image_variant));
ob_clean();
}
if ($image->getWatermark($size) && Config::get('PYTHON_PIL_PASTE')) {
$script_file_path = Config::get('PYTHON_PIL_PASTE')->script_file_path;
$pil_options = (isset(Config::get('PYTHON_PIL_PASTE')->pil_options) && Config::get('PYTHON_PIL_PASTE')->pil_options) ? ' ' . implode(' ', Config::get('PYTHON_PIL_PASTE')->pil_options) : '';
ob_start();
exec($script_file_path
. $pil_options
. ' ' . self::getFilePath($image_variant)
. ' ' . Config::get('PATH_WEB_ROOT') . '/' . $image->getWatermark($size));
ob_clean();
}
}
/**