X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fmedia%2FBitmap.php;h=ac39e6f3d4fb0f017f1640c92773b1388f81c35f;hp=ac0564d2e829bc43e77cb293a61d99be06740af3;hb=a9007e8baf802f0f57d095e3bb4ad201c98c0cb3;hpb=4cb5e3f5da76ae435263ac0c1323da40c91d097a diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index ac0564d2e8..ac39e6f3d4 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -88,7 +88,7 @@ class BitmapHandler extends TransformationalImageHandler { /** * @param File $image - * @param array $params + * @param array &$params * @return bool */ function normaliseParams( $image, &$params ) { @@ -129,7 +129,7 @@ class BitmapHandler extends TransformationalImageHandler { * @param File $image File associated with this thumbnail * @param array $params Array with scaler params * - * @return MediaTransformError Error object if error occurred, false (=no error) otherwise + * @return MediaTransformError|bool Error object if error occurred, false (=no error) otherwise */ protected function transformImageMagick( $image, $params ) { # use ImageMagick @@ -150,7 +150,7 @@ class BitmapHandler extends TransformationalImageHandler { if ( $params['interlace'] ) { $animation_post = [ '-interlace', 'JPEG' ]; } - # Sharpening, see bug 6193 + # Sharpening, see T8193 if ( ( $params['physicalWidth'] + $params['physicalHeight'] ) / ( $params['srcWidth'] + $params['srcHeight'] ) < $wgSharpenReductionThreshold @@ -178,10 +178,10 @@ class BitmapHandler extends TransformationalImageHandler { // be a total drag. :P $scene = 0; } elseif ( $this->isAnimatedImage( $image ) ) { - // Coalesce is needed to scale animated GIFs properly (bug 1017). + // Coalesce is needed to scale animated GIFs properly (T3017). $animation_pre = [ '-coalesce' ]; // We optimize the output, but -optimize is broken, - // use optimizeTransparency instead (bug 11822) + // use optimizeTransparency instead (T13822) if ( version_compare( $this->getMagickVersion(), "6.3.5" ) >= 0 ) { $animation_post = [ '-fuzz', '5%', '-layers', 'optimizeTransparency' ]; } @@ -211,7 +211,7 @@ class BitmapHandler extends TransformationalImageHandler { && $xcfMeta['colorType'] === 'greyscale-alpha' && version_compare( $this->getMagickVersion(), "6.8.9-3" ) < 0 ) { - // bug 66323 - Greyscale images not rendered properly. + // T68323 - Greyscale images not rendered properly. // So only take the "red" channel. $channelOnly = [ '-channel', 'R', '-separate' ]; $animation_pre = array_merge( $animation_pre, $channelOnly ); @@ -272,7 +272,7 @@ class BitmapHandler extends TransformationalImageHandler { * @param File $image File associated with this thumbnail * @param array $params Array with scaler params * - * @return MediaTransformError Error object if error occurred, false (=no error) otherwise + * @return MediaTransformError Error|bool object if error occurred, false (=no error) otherwise */ protected function transformImageMagickExt( $image, $params ) { global $wgSharpenReductionThreshold, $wgSharpenParameter, $wgMaxAnimatedGifArea, @@ -283,7 +283,7 @@ class BitmapHandler extends TransformationalImageHandler { $im->readImage( $params['srcPath'] ); if ( $params['mimeType'] == 'image/jpeg' ) { - // Sharpening, see bug 6193 + // Sharpening, see T8193 if ( ( $params['physicalWidth'] + $params['physicalHeight'] ) / ( $params['srcWidth'] + $params['srcHeight'] ) < $wgSharpenReductionThreshold @@ -312,7 +312,7 @@ class BitmapHandler extends TransformationalImageHandler { // be a total drag. :P $im->setImageScene( 0 ); } elseif ( $this->isAnimatedImage( $image ) ) { - // Coalesce is needed to scale animated GIFs properly (bug 1017). + // Coalesce is needed to scale animated GIFs properly (T3017). $im = $im->coalesceImages(); } // GIF interlacing is only available since 6.3.4 @@ -367,7 +367,7 @@ class BitmapHandler extends TransformationalImageHandler { * @param File $image File associated with this thumbnail * @param array $params Array with scaler params * - * @return MediaTransformError Error object if error occurred, false (=no error) otherwise + * @return MediaTransformError Error|bool object if error occurred, false (=no error) otherwise */ protected function transformCustom( $image, $params ) { # Use a custom convert command @@ -399,7 +399,7 @@ class BitmapHandler extends TransformationalImageHandler { * @param File $image File associated with this thumbnail * @param array $params Array with scaler params * - * @return MediaTransformError Error object if error occurred, false (=no error) otherwise + * @return MediaTransformError|bool Error object if error occurred, false (=no error) otherwise */ protected function transformGd( $image, $params ) { # Use PHP's builtin GD library functions.