BitmapHandler Class Reference

Inherits ImageHandler.

Inherited by BitmapHandler_ClientOnly, BmpHandler, and TiffHandler.

List of all members.

Public Member Functions

 normaliseParams ($image, &$params)
 Changes the parameter array as necessary, ready for transformation.
 doTransform ($image, $dstPath, $dstUrl, $params, $flags=0)
 Get a MediaTransformOutput object representing the transformed output.
 getMetadata ($image, $filename)
 Get handler-specific metadata which will be saved in the img_metadata field.
 getMetadataType ($image)
 Get a string describing the type of metadata, for display purposes.
 isMetadataValid ($image, $metadata)
 Check if the metadata string is valid for this handler.
 visibleMetadataFields ()
 Get a list of EXIF metadata items which should be displayed when the metadata table is collapsed.
 formatMetadata ($image)
 Get an array structure that looks like this:.

Static Public Member Functions

static imageJpegWrapper ($dst_image, $thumbPath)


Detailed Description

Definition at line 10 of file Bitmap.php.


Member Function Documentation

BitmapHandler::doTransform ( image,
dstPath,
dstUrl,
params,
flags = 0 
)

Get a MediaTransformOutput object representing the transformed output.

Does the transform unless $flags contains self::TRANSFORM_LATER.

Parameters:
Image $image The image object
string $dstPath Filesystem destination path
string $dstUrl Destination URL to use in output HTML
array $params Arbitrary set of parameters validated by $this->validateParam()
integer $flags A bitfield, may contain self::TRANSFORM_LATER

Reimplemented from MediaHandler.

Reimplemented in BitmapHandler_ClientOnly.

Definition at line 43 of file Bitmap.php.

References $cmd, $flags, $src, $wgCustomConvertCommand, $wgImageMagickConvertCommand, $wgImageMagickTempDir, $wgMaxAnimatedGifArea, $wgSharpenParameter, $wgSharpenReductionThreshold, $wgUseImageMagick, $wgUseImageResize, normaliseParams(), MediaHandler::removeBadFile(), wfDebug(), wfDebugLog(), wfEscapeShellArg(), wfHostname(), wfMkdirParents(), wfProfileIn(), wfProfileOut(), and wfShellExec().

BitmapHandler::formatMetadata ( image  ) 

Get an array structure that looks like this:.

array( 'visible' => array( 'Human-readable name' => 'Human readable value', ... ), 'collapsed' => array( 'Human-readable name' => 'Human readable value', ... ) ) The UI will format this into a table where the visible fields are always visible, and the collapsed fields are optionally visible.

The function should return false if there is no metadata to display. FIXME: I don't really like this interface, it's not very flexible I think the media handler should generate HTML instead. It can do all the formatting according to some standard. That makes it possible to do things like visual indication of grouped and chained streams in ogg container files.

Reimplemented from MediaHandler.

Definition at line 301 of file Bitmap.php.

References $name, $result, MediaHandler::addMeta(), and visibleMetadataFields().

BitmapHandler::getMetadata ( image,
path 
)

Get handler-specific metadata which will be saved in the img_metadata field.

Parameters:
Image $image The image object, or false if there isn't one
string $fileName The filename
Returns:
string

Reimplemented from MediaHandler.

Definition at line 240 of file Bitmap.php.

References $filename, $wgShowEXIF, and Exif::version().

BitmapHandler::getMetadataType ( image  ) 

Get a string describing the type of metadata, for display purposes.

Reimplemented from MediaHandler.

Definition at line 256 of file Bitmap.php.

static BitmapHandler::imageJpegWrapper ( dst_image,
thumbPath 
) [static]

Definition at line 234 of file Bitmap.php.

BitmapHandler::isMetadataValid ( image,
metadata 
)

Check if the metadata string is valid for this handler.

If it returns false, Image will reload the metadata from the file and update the database

Reimplemented from MediaHandler.

Definition at line 260 of file Bitmap.php.

References $wgShowEXIF, Exif::version(), and wfDebug().

BitmapHandler::normaliseParams ( image,
&$  params 
)

Changes the parameter array as necessary, ready for transformation.

Should be idempotent. Returns false if the parameters are unacceptable and the transform should fail

Reimplemented from ImageHandler.

Reimplemented in BitmapHandler_ClientOnly.

Definition at line 11 of file Bitmap.php.

References $wgMaxImageArea.

Referenced by doTransform().

BitmapHandler::visibleMetadataFields (  ) 

Get a list of EXIF metadata items which should be displayed when the metadata table is collapsed.

Returns:
array of strings
Access:
private

Definition at line 288 of file Bitmap.php.

References $fields, and wfMsgForContent().

Referenced by formatMetadata().


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

Generated on Sat Sep 5 02:08:33 2009 for MediaWiki by  doxygen 1.5.9