MediaWiki
REL1_24
|
JPEG specific handler. More...
Public Member Functions | |
getMetadata ($image, $filename) | |
Get handler-specific metadata which will be saved in the img_metadata field. | |
getScriptParams ($params) | |
makeParamString ($params) | |
Merge a parameter array into a string appropriate for inclusion in filenames. | |
normaliseParams ($image, &$params) | |
parseParamString ($str) | |
Parse a param string made with makeParamString back into an array. | |
rotate ($file, $params) | |
sanitizeParamsForBucketing ($params) | |
Returns a normalised params array for which parameters have been cleaned up for bucketing purposes. | |
supportsBucketing () | |
Returns whether or not this handler supports the chained generation of thumbnails according to buckets. | |
validateParam ($name, $value) | |
Validate a thumbnail parameter at parse time. | |
Static Private Member Functions | |
static | validateQuality ($value) |
Validate and normalize quality value to be between 1 and 100 (inclusive). |
JPEG specific handler.
Inherits most stuff from BitmapHandler, just here to do the metadata handler differently.
Metadata stuff common to Jpeg and built-in Tiff (not PagedTiffHandler) is in ExifBitmapHandler.
JpegHandler::getMetadata | ( | $ | image, |
$ | path | ||
) |
Get handler-specific metadata which will be saved in the img_metadata field.
File | $image | The image object, or false if there isn't one. Warning, FSFile::getPropsFromPath might pass an (object)array() instead (!) |
string | $path | The filename |
Reimplemented from MediaHandler.
Definition at line 99 of file Jpeg.php.
References $e, ExifBitmapHandler\BROKEN_FILE, BitmapMetadataHandler\Jpeg(), version, and wfDebug().
JpegHandler::getScriptParams | ( | $ | params | ) |
Reimplemented from ImageHandler.
JpegHandler::makeParamString | ( | $ | params | ) |
Merge a parameter array into a string appropriate for inclusion in filenames.
array | $params | Array of parameters that have been through normaliseParams. |
Reimplemented from ImageHandler.
JpegHandler::normaliseParams | ( | $ | image, |
&$ | params | ||
) |
File | $image | |
array | $params | Transform parameters. Entries with the keys 'width' and 'height' are the respective screen width and height, while the keys 'physicalWidth' and 'physicalHeight' indicate the thumbnail dimensions. |
Reimplemented from TransformationalImageHandler.
Definition at line 35 of file Jpeg.php.
References $params.
JpegHandler::parseParamString | ( | $ | str | ) |
Parse a param string made with makeParamString back into an array.
string | $str | The parameter string without file name (e.g. 122px) |
Reimplemented from ImageHandler.
Definition at line 70 of file Jpeg.php.
References $res.
JpegHandler::rotate | ( | $ | file, |
$ | params | ||
) |
File | $file | |
array | $params | Rotate parameters. 'rotation' clockwise rotation in degrees, allowed are multiples of 90 |
Reimplemented from BitmapHandler.
Definition at line 135 of file Jpeg.php.
References $file, $params, $retval, ExifBitmapHandler\getRotation(), global, MediaHandler\logErrorForExternalProcess(), wfDebug(), wfEscapeShellArg(), wfProfileIn(), wfProfileOut(), and wfShellExecWithStderr().
JpegHandler::sanitizeParamsForBucketing | ( | $ | params | ) |
Returns a normalised params array for which parameters have been cleaned up for bucketing purposes.
array | $params |
Reimplemented from ImageHandler.
Definition at line 166 of file Jpeg.php.
References $params.
Returns whether or not this handler supports the chained generation of thumbnails according to buckets.
Reimplemented from MediaHandler.
JpegHandler::validateParam | ( | $ | name, |
$ | value | ||
) |
Validate a thumbnail parameter at parse time.
Return true to accept the parameter, and false to reject it. If you return false, the parser will do something quiet and forgiving.
string | $name | |
mixed | $value |
Reimplemented from ImageHandler.
Definition at line 45 of file Jpeg.php.
References $name, $value, and validateQuality().
static JpegHandler::validateQuality | ( | $ | value | ) | [static, private] |
Validate and normalize quality value to be between 1 and 100 (inclusive).
int | $value | Quality value, will be converted to integer or 0 if invalid |
Definition at line 57 of file Jpeg.php.
References $value.
Referenced by validateParam().