|
@ -183,7 +183,7 @@ class ImageImagick extends ImageBase { |
|
|
public function resize() { |
|
|
public function resize() { |
|
|
global $config; |
|
|
global $config; |
|
|
|
|
|
|
|
|
if ($this->format == 'gif' && $config['thumb_ext'] == 'gif') { |
|
|
if ($this->format == 'gif' && ($config['thumb_ext'] == 'gif' || $config['thumb_ext'] == '')) { |
|
|
$this->image = new Imagick(); |
|
|
$this->image = new Imagick(); |
|
|
$this->image->setFormat('gif'); |
|
|
$this->image->setFormat('gif'); |
|
|
|
|
|
|
|
@ -266,7 +266,7 @@ class ImageConvert extends ImageBase { |
|
|
|
|
|
|
|
|
$quality = $config['thumb_quality'] * 10; |
|
|
$quality = $config['thumb_quality'] * 10; |
|
|
|
|
|
|
|
|
if ($this->format == 'gif' && $config['thumb_ext'] == 'gif' && $config['thumb_keep_animation_frames'] > 1) { |
|
|
if ($this->format == 'gif' && ($config['thumb_ext'] == 'gif' || $config['thumb_ext'] == '') && $config['thumb_keep_animation_frames'] > 1) { |
|
|
if (shell_exec("convert -background transparent -filter Point -sample {$this->width}x{$this->height} +antialias -quality {$quality} " . |
|
|
if (shell_exec("convert -background transparent -filter Point -sample {$this->width}x{$this->height} +antialias -quality {$quality} " . |
|
|
escapeshellarg($this->src . '') . " " . escapeshellarg($this->temp)) || !file_exists($this->temp)) |
|
|
escapeshellarg($this->src . '') . " " . escapeshellarg($this->temp)) || !file_exists($this->temp)) |
|
|
error('Failed to resize image!'); |
|
|
error('Failed to resize image!'); |
|
|