r105559 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105558‎ | r105559 | r105560 >
Date:16:18, 8 December 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Bug 32874 - Bitmap.php uses -define in ImageMagick configuration line which requires ImageMagick 6.5.6-2 but doesn't do a version check

"Patch"/Idea provided by Christian Neubauer
Modified paths:
  • /trunk/phase3/includes/media/Bitmap.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/media/Bitmap.php
@@ -39,7 +39,6 @@
4040 return true;
4141 }
4242 }
43 -
4443
4544 # Check if the file is smaller than the maximum image area for thumbnailing
4645 $checkImageAreaHookResult = null;
@@ -280,8 +279,10 @@
281280 < $wgSharpenReductionThreshold ) {
282281 $sharpen = "-sharpen " . wfEscapeShellArg( $wgSharpenParameter );
283282 }
284 - // JPEG decoder hint to reduce memory, available since IM 6.5.6-2
285 - $decoderHint = "-define jpeg:size={$params['physicalDimensions']}";
 283+ if ( version_compare( $this->getMagickVersion(), "6.3.5" ) >= 0 ) {
 284+ // JPEG decoder hint to reduce memory, available since IM 6.5.6-2
 285+ $decoderHint = "-define jpeg:size={$params['physicalDimensions']}";
 286+ }
286287
287288 } elseif ( $params['mimeType'] == 'image/png' ) {
288289 $quality = "-quality 95"; // zlib 9, adaptive filtering

Follow-up revisions

RevisionCommit summaryAuthorDate
r105569Fix version check version from r105559reedy18:07, 8 December 2011

Comments

#Comment by Cneubauer (talk | contribs)   18:05, 8 December 2011

I think you forgot to change the version number in there. Should be 6.5.6 right?

Status & tagging log