Show error when ImageMagick is enabled but is not installed
This commit is contained in:
parent
62f2797f4e
commit
7f05618811
1 changed files with 8 additions and 1 deletions
|
@ -506,8 +506,15 @@ function createThumbnail($file_location, $thumb_location, $new_w, $new_h) {
|
|||
|
||||
imagedestroy($dst_img);
|
||||
imagedestroy($src_img);
|
||||
} else { // imagemagick
|
||||
} else { // ImageMagick
|
||||
$discard = '';
|
||||
|
||||
$exit_status = 1;
|
||||
exec("convert -version", $discard, $exit_status);
|
||||
if ($exit_status != 0) {
|
||||
fancyDie('ImageMagick is not installed, or the convert command is not in the server\'s $PATH.<br>Install ImageMagick, or set TINYIB_THUMBNAIL to \'gd\'.');
|
||||
}
|
||||
|
||||
$exit_status = 1;
|
||||
exec("convert $file_location -auto-orient -thumbnail '" . $new_w . "x" . $new_h . "' -coalesce -layers OptimizeFrame -depth 4 -type palettealpha $thumb_location", $discard, $exit_status);
|
||||
|
||||
|
|
Loading…
Reference in a new issue