diff options
| author | Marcin Ćabanowski <marcin@6irc.net> | 2012-12-22 20:16:31 +0100 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-07-31 03:32:44 -0400 |
| commit | f9cdf31ede3bab1aff1ffa5a043bfd9a6eceb6d7 (patch) | |
| tree | cfdbe93b202cc059c748d4e0697963c6532116de | |
| parent | a2d8e4cf3efd97765405e4d51ecdc279b227072b (diff) | |
Fix animated .gif conversion when $config['thumb_ext'] == ''
| -rw-r--r-- | inc/image.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/image.php b/inc/image.php index eb98ceda..f0909b8c 100644 --- a/inc/image.php +++ b/inc/image.php @@ -186,7 +186,7 @@ class ImageImagick extends ImageBase { public function resize() { 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->setFormat('gif'); @@ -274,7 +274,7 @@ class ImageConvert extends ImageBase { $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} " . escapeshellarg($this->src . '') . " " . escapeshellarg($this->temp)) || !file_exists($this->temp)) error('Failed to resize image!'); |
