MediaWiki  REL1_24
BitmapHandler Class Reference

Generic handler for bitmap images. More...

Inheritance diagram for BitmapHandler:
Collaboration diagram for BitmapHandler:

List of all members.

Public Member Functions

 autoRotateEnabled ()
 canRotate ()
 Returns whether the current scaler supports rotation (im and gd do)
 rotate ($file, $params)

Static Public Member Functions

static imageJpegWrapper ($dst_image, $thumbPath, $quality=95)
 Callback for transformGd when transforming jpeg images.

Protected Member Functions

 getScalerType ($dstPath, $checkDstPath=true)
 Returns which scaler type should be used.
 transformCustom ($image, $params)
 Transform an image using a custom command.
 transformGd ($image, $params)
 Transform an image using the built in GD library.
 transformImageMagick ($image, $params)
 Transform an image using ImageMagick.
 transformImageMagickExt ($image, $params)
 Transform an image using the Imagick PHP extension.

Detailed Description

Generic handler for bitmap images.

Definition at line 29 of file Bitmap.php.


Member Function Documentation

See also:
$wgEnableAutoRotation
Returns:
bool Whether auto rotation is enabled

Reimplemented from TransformationalImageHandler.

Definition at line 428 of file Bitmap.php.

References canRotate(), and global.

Referenced by ExifBitmapHandler\getImageSize(), and ExifBitmapHandler\getRotation().

Returns whether the current scaler supports rotation (im and gd do)

Returns:
bool

Reimplemented from TransformationalImageHandler.

Definition at line 405 of file Bitmap.php.

References getScalerType().

Referenced by autoRotateEnabled().

BitmapHandler::getScalerType ( dstPath,
checkDstPath = true 
) [protected]

Returns which scaler type should be used.

Creates parent directories for $dstPath and returns 'client' on error

Parameters:
string$dstPath
bool$checkDstPath
Returns:
string|Callable One of client, im, custom, gd, imext or an array( object, method )

Reimplemented from TransformationalImageHandler.

Reimplemented in XCFHandler.

Definition at line 39 of file Bitmap.php.

References global.

Referenced by canRotate(), and rotate().

static BitmapHandler::imageJpegWrapper ( dst_image,
thumbPath,
quality = 95 
) [static]

Callback for transformGd when transforming jpeg images.

Definition at line 395 of file Bitmap.php.

BitmapHandler::rotate ( file,
params 
)
Parameters:
File$file
array$paramsRotate parameters. 'rotation' clockwise rotation in degrees, allowed are multiples of 90
Since:
1.21
Returns:
bool

Reimplemented from TransformationalImageHandler.

Reimplemented in JpegHandler.

Definition at line 446 of file Bitmap.php.

References $file, $params, $result, $retval, TransformationalImageHandler\escapeMagickInput(), TransformationalImageHandler\escapeMagickOutput(), MediaHandler\getRotation(), getScalerType(), global, MediaHandler\logErrorForExternalProcess(), wfDebug(), wfEscapeShellArg(), wfProfileIn(), wfProfileOut(), and wfShellExecWithStderr().

BitmapHandler::transformCustom ( image,
params 
) [protected]

Transform an image using a custom command.

Parameters:
File$imageFile associated with this thumbnail
array$paramsArray with scaler params
Returns:
MediaTransformError Error object if error occurred, false (=no error) otherwise

Reimplemented from TransformationalImageHandler.

Definition at line 271 of file Bitmap.php.

References $params, $retval, TransformationalImageHandler\getMediaTransformError(), global, MediaHandler\logErrorForExternalProcess(), wfDebug(), wfEscapeShellArg(), wfProfileIn(), wfProfileOut(), and wfShellExecWithStderr().

BitmapHandler::transformGd ( image,
params 
) [protected]

Transform an image using the built in GD library.

Parameters:
File$imageFile associated with this thumbnail
array$paramsArray with scaler params
Returns:
MediaTransformError Error object if error occurred, false (=no error) otherwise

Reimplemented from TransformationalImageHandler.

Definition at line 305 of file Bitmap.php.

References $params, array(), TransformationalImageHandler\extractPreRotationDimensions(), TransformationalImageHandler\getMediaTransformError(), MediaHandler\getRotation(), list, wfDebug(), and wfMessage().

BitmapHandler::transformImageMagickExt ( image,
params 
) [protected]

Transform an image using the Imagick PHP extension.

Parameters:
File$imageFile associated with this thumbnail
array$paramsArray with scaler params
Returns:
MediaTransformError Error object if error occurred, false (=no error) otherwise

Reimplemented from TransformationalImageHandler.

Definition at line 194 of file Bitmap.php.

References $e, $params, $result, as, TransformationalImageHandler\extractPreRotationDimensions(), ImageHandler\getImageArea(), TransformationalImageHandler\getMediaTransformError(), MediaHandler\getRotation(), global, MediaHandler\isAnimatedImage(), list, and wfDebug().


The documentation for this class was generated from the following file: