Passed -size hint to convert, as recommended in the convert manpage. This gives a huge saving in CPU and memory time for thumbnailing of large images.

This commit is contained in:
Tim Starling 2005-09-07 16:01:42 +00:00
parent e8c2db18a6
commit 8a841f6e81

View file

@ -1022,8 +1022,8 @@ class Image
# Specify white background color, will be used for transparent images
# in Internet Explorer/Windows instead of default black.
$cmd = $wgImageMagickConvertCommand .
" -quality 85 -background white -geometry {$width} ".
wfEscapeShellArg($this->imagePath) . " " .
" -quality 85 -background white -size {$width}x{$height} ".
wfEscapeShellArg($this->imagePath) . " -resize {$width}x{$height} " .
wfEscapeShellArg($thumbPath);
wfDebug("reallyRenderThumb: running ImageMagick: $cmd");
$conv = shell_exec( $cmd );