Index: trunk/phase3/includes/media/Bitmap.php |
— | — | @@ -39,7 +39,6 @@ |
40 | 40 | return true; |
41 | 41 | } |
42 | 42 | } |
43 | | - |
44 | 43 | |
45 | 44 | # Check if the file is smaller than the maximum image area for thumbnailing |
46 | 45 | $checkImageAreaHookResult = null; |
— | — | @@ -280,8 +279,10 @@ |
281 | 280 | < $wgSharpenReductionThreshold ) { |
282 | 281 | $sharpen = "-sharpen " . wfEscapeShellArg( $wgSharpenParameter ); |
283 | 282 | } |
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 | + } |
286 | 287 | |
287 | 288 | } elseif ( $params['mimeType'] == 'image/png' ) { |
288 | 289 | $quality = "-quality 95"; // zlib 9, adaptive filtering |