X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fmedia%2FBitmap.php;h=617a910295cafc9c9c017a9217df069b649238e7;hb=8a95833baed3b8071fcbd8cd2bc8c3449409f665;hp=0f0b074a677aaf04d10d150461b736c30edba588;hpb=2dd58ade75d15a5895c0c010e17b6f729a0f72fe;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index 0f0b074a67..617a910295 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 ) { @@ -112,14 +112,14 @@ class BitmapHandler extends TransformationalImageHandler { */ protected function imageMagickSubsampling( $pixelFormat ) { switch ( $pixelFormat ) { - case 'yuv444': - return [ '1x1', '1x1', '1x1' ]; - case 'yuv422': - return [ '2x1', '1x1', '1x1' ]; - case 'yuv420': - return [ '2x2', '1x1', '1x1' ]; - default: - throw new MWException( 'Invalid pixel format for JPEG output' ); + case 'yuv444': + return [ '1x1', '1x1', '1x1' ]; + case 'yuv422': + return [ '2x1', '1x1', '1x1' ]; + case 'yuv420': + return [ '2x2', '1x1', '1x1' ]; + default: + throw new MWException( 'Invalid pixel format for JPEG output' ); } } @@ -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 @@ -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, @@ -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.