diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-04-19 10:27:47 +1000 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-04-19 10:27:47 +1000 |
| commit | 5c9fcfc50e503887acbdf3e4994de4972beb720f (patch) | |
| tree | 265045b61a4055622658a02ee5ad62f41717bdda | |
| parent | 163c11d001614253b147da0191b593e13be0de42 (diff) | |
Bugfix: Fix transparancy with `convert`
| -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 7899ba99..28242946 100644 --- a/inc/image.php +++ b/inc/image.php @@ -267,11 +267,11 @@ class ImageConvert extends ImageBase { $quality = $config['thumb_quality'] * 10; if ($this->format == 'gif' && $config['thumb_ext'] == 'gif' && $config['thumb_keep_animation_frames'] > 1) { - if (shell_exec("convert -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)) error('Failed to resize image!'); } else { - if (shell_exec("convert -flatten -filter Point -scale {$this->width}x{$this->height} +antialias -quality {$quality} " . + if (shell_exec("convert -background transparent -flatten -filter Point -scale {$this->width}x{$this->height} +antialias -quality {$quality} " . escapeshellarg($this->src . '[0]') . " " . escapeshellarg($this->temp)) || !file_exists($this->temp)) error('Failed to resize image!'); } |
