MediaWiki  REL1_24
XCFHandler Class Reference

Handler for the Gimp's native file format; getimagesize() doesn't support these files. More...

Inheritance diagram for XCFHandler:
Collaboration diagram for XCFHandler:

List of all members.

Public Member Functions

 canRender ($file)
 Can we render this file?
 getImageSize ($image, $filename)
 Get width and height from the XCF header.
 getMetadata ($file, $filename)
 Store the channel type.
 getThumbType ($ext, $mime, $params=null)
 Render files as PNG.
 isMetadataValid ($file, $metadata)
 Should we refresh the metadata.
 mustRender ($file)

Static Public Member Functions

static getXCFMetaData ($filename)
 Metadata for a given XCF file.

Protected Member Functions

 getScalerType ($dstPath, $checkDstPath=true)
 Must use "im" for XCF.

Detailed Description

Handler for the Gimp's native file format; getimagesize() doesn't support these files.

Definition at line 35 of file XCF.php.


Member Function Documentation

XCFHandler::canRender ( file)

Can we render this file?

Image magick doesn't support indexed xcf files as of current writing (as of 6.8.9-3)

Parameters:
File$file
Returns:
bool

Reimplemented from ImageHandler.

Definition at line 224 of file XCF.php.

References $file, wfRestoreWarnings(), and wfSuppressWarnings().

XCFHandler::getImageSize ( image,
filename 
)

Get width and height from the XCF header.

Parameters:
File$image
string$filename
Returns:
array

Reimplemented from ImageHandler.

Definition at line 63 of file XCF.php.

References array(), color, and getXCFMetaData().

XCFHandler::getMetadata ( file,
filename 
)

Store the channel type.

Greyscale files need different command line options.

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

Reimplemented from MediaHandler.

Definition at line 161 of file XCF.php.

References array().

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

Must use "im" for XCF.

Parameters:
string$dstPath
bool$checkDstPath
Returns:
string

Reimplemented from BitmapHandler.

Definition at line 212 of file XCF.php.

XCFHandler::getThumbType ( ext,
mime,
params = null 
)

Render files as PNG.

Parameters:
string$ext
string$mime
array$params
Returns:
array

Reimplemented from MediaHandler.

Definition at line 52 of file XCF.php.

References array().

static XCFHandler::getXCFMetaData ( filename) [static]

Metadata for a given XCF file.

Will return false if file magic signature is not recognized

Author:
Hexmode
Hashar
Parameters:
string$filenameFull path to a XCF file
Returns:
bool|array Metadata Array just like PHP getimagesize()

Definition at line 98 of file XCF.php.

References $f, wfDebug(), and wfUnpack().

Referenced by getImageSize().

XCFHandler::isMetadataValid ( file,
metadata 
)

Should we refresh the metadata.

Parameters:
File$fileThe file object for the file in question
string$metadataSerialized metadata
Returns:
bool One of the self::METADATA_(BAD|GOOD|COMPATIBLE) constants

Reimplemented from MediaHandler.

Definition at line 196 of file XCF.php.

References MediaHandler\METADATA_BAD, and MediaHandler\METADATA_GOOD.

Parameters:
File$file
Returns:
bool

Reimplemented from TransformationalImageHandler.

Definition at line 40 of file XCF.php.


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