MediaWiki  REL1_22
GIFHandler Class Reference

Handler for GIF images. More...

Inheritance diagram for GIFHandler:
Collaboration diagram for GIFHandler:

List of all members.

Public Member Functions

 canAnimateThumbnail ($file)
 We cannot animate thumbnails that are bigger than a particular size.
 formatMetadata ($image)
 getImageArea ($image)
 getLongDesc ($image)
 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.
 isAnimatedImage ($image)
 isMetadataValid ($image, $metadata)
 Check if the metadata string is valid for this handler.

Public Attributes

const BROKEN_FILE = '0'

Detailed Description

Handler for GIF images.

Definition at line 29 of file GIF.php.


Member Function Documentation

We cannot animate thumbnails that are bigger than a particular size.

Parameters:
File$file
Returns:
bool

Reimplemented from MediaHandler.

Definition at line 101 of file GIF.php.

References $file, getImageArea(), and global.

Parameters:
$imageFile
Returns:
array|bool

Reimplemented from MediaHandler.

Definition at line 49 of file GIF.php.

References MediaHandler\formatMetadataHelper().

Parameters:
$imageFile
Todo:
unittests
Returns:
bool

Reimplemented from ImageHandler.

Definition at line 71 of file GIF.php.

Referenced by canAnimateThumbnail().

Parameters:
$imageFile
Returns:
string

Reimplemented from ImageHandler.

Definition at line 138 of file GIF.php.

References $wgLang, array(), global, wfMessage(), wfRestoreWarnings(), and wfSuppressWarnings().

GIFHandler::getMetadata ( image,
path 
)

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

Parameters:
$imageFile: the image object, or false if there isn't one. Warning, FSFile::getPropsFromPath might pass an (object)array() instead (!)
string$paththe filename
Returns:
String

Reimplemented from MediaHandler.

Definition at line 33 of file GIF.php.

References BROKEN_FILE, BitmapMetadataHandler\GIF(), and wfDebug().

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

Returns:
string

Reimplemented from MediaHandler.

Definition at line 107 of file GIF.php.

Parameters:
$imageFile
Returns:
bool

Reimplemented from MediaHandler.

Definition at line 85 of file GIF.php.

GIFHandler::isMetadataValid ( image,
metadata 
)

Check if the metadata string is valid for this handler.

If it returns MediaHandler::METADATA_BAD (or false), Image will reload the metadata from the file and update the database. MediaHandler::METADATA_GOOD for if the metadata is a-ok, MediaHanlder::METADATA_COMPATIBLE if metadata is old but backwards compatible (which may or may not trigger a metadata reload).

Returns:
bool

Reimplemented from MediaHandler.

Definition at line 111 of file GIF.php.

References MediaHandler\METADATA_BAD, MediaHandler\METADATA_COMPATIBLE, MediaHandler\METADATA_GOOD, GIFMetadataExtractor\VERSION, wfDebug(), wfRestoreWarnings(), and wfSuppressWarnings().


Member Data Documentation

Definition at line 31 of file GIF.php.

Referenced by getMetadata(), and GIFHandlerTest\testInvalidFile().


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