Fix animated thumbnails with convert
and Imagick
This commit is contained in:
parent
b0eda5dcbc
commit
c360c7f673
@ -267,11 +267,11 @@ 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_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 -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!');
|
||||||
} else {
|
} else {
|
||||||
if (shell_exec("convert -background transparent -flatten -filter Point -scale {$this->width}x{$this->height} +antialias -quality {$quality} " .
|
if (shell_exec("convert -flatten -filter Point -scale {$this->width}x{$this->height} +antialias -quality {$quality} " .
|
||||||
escapeshellarg($this->src . '[0]') . " " . escapeshellarg($this->temp)) || !file_exists($this->temp))
|
escapeshellarg($this->src . '[0]') . " " . escapeshellarg($this->temp)) || !file_exists($this->temp))
|
||||||
error('Failed to resize image!');
|
error('Failed to resize image!');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user