From 8a841f6e81ed34d62022e8bd022e35b1b46cd12c Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Wed, 7 Sep 2005 16:01:42 +0000 Subject: [PATCH] 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. --- includes/Image.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Image.php b/includes/Image.php index 674ce74f12..87f2744669 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -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 ); -- 2.20.1