1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-14 10:57:38 +01:00

gifsicle: temporary fix; STI: gifsicle REALLY sends that to stderr for every gif shorter than 50 frames

This commit is contained in:
czaks 2013-08-06 19:40:17 -04:00 committed by Michael Foster
parent 8b26201a05
commit c672b700b0

View File

@ -320,9 +320,9 @@ class ImageConvert extends ImageBase {
if ($this->format == 'gif' && ($config['thumb_ext'] == 'gif' || $config['thumb_ext'] == '') && $config['thumb_keep_animation_frames'] > 1) { if ($this->format == 'gif' && ($config['thumb_ext'] == 'gif' || $config['thumb_ext'] == '') && $config['thumb_keep_animation_frames'] > 1) {
if ($this->gifsicle) { if ($this->gifsicle) {
if (($error = shell_exec_error("gifsicle -w --unoptimize -O2 --resize {$this->width}x{$this->height} < " . if (($error = shell_exec("gifsicle -w --unoptimize -O2 --resize {$this->width}x{$this->height} < " .
escapeshellarg($this->src . '') . " \"#0-{$config['thumb_keep_animation_frames']}\" -o " . escapeshellarg($this->src . '') . " \"#0-{$config['thumb_keep_animation_frames']}\" -o " .
escapeshellarg($this->temp), true)) || !file_exists($this->temp)) escapeshellarg($this->temp))) || !file_exists($this->temp))
error('Failed to resize image!', null, $error); error('Failed to resize image!', null, $error);
} else { } else {
if ($config['convert_manual_orient'] && ($this->format == 'jpg' || $this->format == 'jpeg')) if ($config['convert_manual_orient'] && ($this->format == 'jpg' || $this->format == 'jpeg'))