1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-24 07:30:10 +01:00

Tiny code clean-up

This commit is contained in:
Michael Foster 2013-07-31 03:35:07 -04:00
parent 73cb2bdf2c
commit 573f86ccae

View File

@ -81,9 +81,7 @@ class Image {
$height = $max_height; $height = $max_height;
} }
if ($gifsicle) { $thumb->gifsicle = $gifsicle;
$thumb->gifsicle = 1;
}
$thumb->_resize($this->image->image, $width, $height); $thumb->_resize($this->image->image, $width, $height);
return $thumb; return $thumb;
@ -288,8 +286,7 @@ class ImageConvert extends ImageBase {
if (shell_exec("gifsicle --unoptimize -O2 --resize {$this->width}x{$this->height} < " . if (shell_exec("gifsicle --unoptimize -O2 --resize {$this->width}x{$this->height} < " .
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 -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!');