|
eZ Publish
[4.2]
|
The class eZImageGDHandler does. More...
Inheritance diagram for eZImageGDHandler:
Collaboration diagram for eZImageGDHandler:Public Member Functions | |
| calculateFixedHeightAspectGeometry ($sourceWidth, $sourceHeight, $destinationHeight, $allowUpScale) | |
| calculateFixedWidthAspectGeometry ($sourceWidth, $sourceHeight, $destinationWidth, $allowUpScale) | |
| calculateScaledAspectGeometry ($sourceWidth, $sourceHeight, $destinationWidth, $destinationHeight, $allowUpScale) | |
| calculateScaledPercentAspectGeometry ($sourceWidth, $sourceHeight, $destinationWidthPercent, $destinationHeightPercent, $allowUpScale) | |
| convert ($manager, $sourceMimeData, &$destinationMimeData, $filters=false) | |
| createImageBorder ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| cropImage ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| eZImageGDHandler ($handlerName, $isGloballyEnabled, $outputRewriteType=self::REPLACE_SUFFIX, $conversionRules=false) | |
| scaleImage ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| scaleImageDownOnly ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| scaleImageExact ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| scaleImageHeight ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| scaleImageHeightDownOnly ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| scaleImagePercent ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| scaleImageWidth ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| scaleImageWidthDownOnly ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| setImageBorder ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| setImageBorderWidth ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| setImageColorspaceGray ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| setImageColorThresholdName ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| setImageLuminance ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
| setImageLuminanceColorScale ($imageObject, $filterData, $sourceMimeData, $destinationMimeData, $colorScale) | |
| setImageLuminanceNamed ($imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) | |
Static Public Member Functions | |
| static | createFromINI ($iniGroup, $iniFilename=false) |
| static | createGeometry ($width, $height, $x=0, $y=0) |
| static | imageCopy ($imageObject, $destinationGeometry, $sourceGeometry, $sourceMimeData, $destinationMimeData) |
| static | imageCreate ($width, $height, $isTrueColor=true) |
| static | isImageTrueColor (&$imageObject, $mimeData) |
| static | scaleImageCopy ($imageObject, $geometry, $sourceMimeData, $destinationMimeData) |
| static | setImageBorderColor (&$imageObject, $filterData, &$filterVariables, $sourceMimeData, $destinationMimeData) |
| static | setImageColorThreshold ($imageObject, $filterData, $sourceMimeData, $destinationMimeData, $thresholdList) |
Public Attributes | |
| $Executable | |
| $Path | |
| $PostParameters | |
| $PreParameters | |
The class eZImageGDHandler does.
A geometry array has the following entries.
Definition at line 46 of file ezimagegdhandler.php.
| eZImageGDHandler::calculateFixedHeightAspectGeometry | ( | $ | sourceWidth, |
| $ | sourceHeight, | ||
| $ | destinationHeight, | ||
| $ | allowUpScale | ||
| ) |
Calculates the geometry for the scaled image with a fixed height while maintaining the aspect ratio.
| $allowUpScale | If this is true images will be scaled up as well, if not they will keep their source size. |
Definition at line 633 of file ezimagegdhandler.php.
Referenced by scaleImageHeight(), and scaleImageHeightDownOnly().
| eZImageGDHandler::calculateFixedWidthAspectGeometry | ( | $ | sourceWidth, |
| $ | sourceHeight, | ||
| $ | destinationWidth, | ||
| $ | allowUpScale | ||
| ) |
Calculates the geometry for the scaled image with a fixed width while maintaining the aspect ratio.
| $allowUpScale | If this is true images will be scaled up as well, if not they will keep their source size. |
Definition at line 608 of file ezimagegdhandler.php.
Referenced by scaleImageWidth(), and scaleImageWidthDownOnly().
| eZImageGDHandler::calculateScaledAspectGeometry | ( | $ | sourceWidth, |
| $ | sourceHeight, | ||
| $ | destinationWidth, | ||
| $ | destinationHeight, | ||
| $ | allowUpScale | ||
| ) |
Calculates the geometry for the scaled image while maintaining the aspect ratio.
| $allowUpScale | If this is true images will be scaled up as well, if not they will keep their source size. |
Definition at line 560 of file ezimagegdhandler.php.
Referenced by calculateScaledPercentAspectGeometry(), scaleImage(), and scaleImageDownOnly().
| eZImageGDHandler::calculateScaledPercentAspectGeometry | ( | $ | sourceWidth, |
| $ | sourceHeight, | ||
| $ | destinationWidthPercent, | ||
| $ | destinationHeightPercent, | ||
| $ | allowUpScale | ||
| ) |
Calculates the geometry for the scaled image in terms of percent while maintaining the aspect ratio.
| $allowUpScale | If this is true images will be scaled up as well, if not they will keep their source size. |
Definition at line 591 of file ezimagegdhandler.php.
Referenced by scaleImagePercent().
| eZImageGDHandler::convert | ( | $ | manager, |
| $ | sourceMimeData, | ||
| &$ | destinationMimeData, | ||
| $ | filters = false |
||
| ) | [virtual] |
Creates the shell string and runs the executable.
Implements eZImageHandler.
Definition at line 141 of file ezimagegdhandler.php.
| static eZImageGDHandler::createFromINI | ( | $ | iniGroup, |
| $ | iniFilename = false |
||
| ) | [static] |
Creates a new image handler for shell executable from INI settings. The INI settings are read from ini file $iniFilename and group $iniGroup. If $iniFilename is not supplied image.ini is used.
Definition at line 724 of file ezimagegdhandler.php.
Referenced by eZImageGDFactory\produceFromINI().
| static eZImageGDHandler::createGeometry | ( | $ | width, |
| $ | height, | ||
| $ | x = 0, |
||
| $ | y = 0 |
||
| ) | [static] |
Creates a geometry array with width $width, height $height, x position $x and y position $y and returns it.
Definition at line 711 of file ezimagegdhandler.php.
Referenced by calculateFixedHeightAspectGeometry(), calculateFixedWidthAspectGeometry(), calculateScaledAspectGeometry(), createImageBorder(), cropImage(), and scaleImageExact().
| eZImageGDHandler::createImageBorder | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Definition at line 253 of file ezimagegdhandler.php.
Referenced by setImageBorder(), and setImageBorderWidth().
| eZImageGDHandler::cropImage | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Crops a portion of the image from the filter parameters.
Definition at line 427 of file ezimagegdhandler.php.
| eZImageGDHandler::eZImageGDHandler | ( | $ | handlerName, |
| $ | isGloballyEnabled, | ||
| $ | outputRewriteType = self::REPLACE_SUFFIX, |
||
| $ | conversionRules = false |
||
| ) |
| static eZImageGDHandler::imageCopy | ( | $ | imageObject, |
| $ | destinationGeometry, | ||
| $ | sourceGeometry, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) | [static] |
Copies a portion of the source image $imageObject to a new image.
Definition at line 674 of file ezimagegdhandler.php.
Referenced by createImageBorder(), and cropImage().
| static eZImageGDHandler::imageCreate | ( | $ | width, |
| $ | height, | ||
| $ | isTrueColor = true |
||
| ) | [static] |
Creates a new GD image and returns it.
| $isTrueColor | determines if a true color image is created, if false an indexed image is created. |
Definition at line 700 of file ezimagegdhandler.php.
Referenced by imageCopy(), and scaleImageCopy().
| static eZImageGDHandler::isImageTrueColor | ( | &$ | imageObject, |
| $ | mimeData | ||
| ) | [static] |
true if the image object $imageObject is in true color format. Definition at line 691 of file ezimagegdhandler.php.
Referenced by imageCopy(), and scaleImageCopy().
| eZImageGDHandler::scaleImage | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Scales the image $imageObject to the size specified in $filterData with aspect ration maintained. This means that image will not be exactly the image size.
Definition at line 450 of file ezimagegdhandler.php.
| static eZImageGDHandler::scaleImageCopy | ( | $ | imageObject, |
| $ | geometry, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) | [static] |
Scales the image $imageObject to the size specified in $filterData.
Definition at line 655 of file ezimagegdhandler.php.
Referenced by scaleImage(), scaleImageDownOnly(), scaleImageExact(), scaleImageHeight(), scaleImageHeightDownOnly(), scaleImagePercent(), scaleImageWidth(), and scaleImageWidthDownOnly().
| eZImageGDHandler::scaleImageDownOnly | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Scales the image $imageObject to the size specified in $filterData with aspect ration maintained. This means that image will not be exactly the image size.
Definition at line 465 of file ezimagegdhandler.php.
| eZImageGDHandler::scaleImageExact | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Scales the image $imageObject to the size specified in $filterData without caring about aspect ratio.
Definition at line 535 of file ezimagegdhandler.php.
| eZImageGDHandler::scaleImageHeight | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Scales the image $imageObject to the size specified in $filterData with aspect ration maintained. This means that image will not be exactly the image size.
Definition at line 493 of file ezimagegdhandler.php.
| eZImageGDHandler::scaleImageHeightDownOnly | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Scales the image $imageObject to the size specified in $filterData with aspect ration maintained. This means that image will not be exactly the image size.
Definition at line 523 of file ezimagegdhandler.php.
| eZImageGDHandler::scaleImagePercent | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Scales the image $imageObject to the size specified in $filterData with aspect ratio maintained.
Definition at line 545 of file ezimagegdhandler.php.
| eZImageGDHandler::scaleImageWidth | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Scales the image $imageObject to the size specified in $filterData with aspect ration maintained. This means that image will not be exactly the image size.
Definition at line 479 of file ezimagegdhandler.php.
| eZImageGDHandler::scaleImageWidthDownOnly | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Scales the image $imageObject to the size specified in $filterData with aspect ration maintained. This means that image will not be exactly the image size.
Definition at line 508 of file ezimagegdhandler.php.
| eZImageGDHandler::setImageBorder | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Definition at line 247 of file ezimagegdhandler.php.
| static eZImageGDHandler::setImageBorderColor | ( | &$ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) | [static] |
Definition at line 235 of file ezimagegdhandler.php.
| eZImageGDHandler::setImageBorderWidth | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Definition at line 241 of file ezimagegdhandler.php.
| eZImageGDHandler::setImageColorspaceGray | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Converts the image to grayscale.
Definition at line 278 of file ezimagegdhandler.php.
| static eZImageGDHandler::setImageColorThreshold | ( | $ | imageObject, |
| $ | filterData, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData, | ||
| $ | thresholdList | ||
| ) | [static] |
Changes the colors of the image based on threshold values. The luminance will be calculated and if it is in a threshold range it will use the specified color for the range.
Definition at line 383 of file ezimagegdhandler.php.
Referenced by setImageColorThresholdName().
| eZImageGDHandler::setImageColorThresholdName | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Changes the colors of the image based on threshold values. The threshold values are based on the filter name.
Definition at line 360 of file ezimagegdhandler.php.
| eZImageGDHandler::setImageLuminance | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Changes the colors of the image based on the luminance. The new scale for the colors are taken from the filter parameters, the parameters must contain three values.
Definition at line 289 of file ezimagegdhandler.php.
| eZImageGDHandler::setImageLuminanceColorScale | ( | $ | imageObject, |
| $ | filterData, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData, | ||
| $ | colorScale | ||
| ) |
Changes the colors of the image based on the luminance.
| $colorScale | is an array with three float elements in range 0 to 1 that define the new color scale. |
Definition at line 320 of file ezimagegdhandler.php.
Referenced by setImageColorspaceGray(), setImageLuminance(), and setImageLuminanceNamed().
| eZImageGDHandler::setImageLuminanceNamed | ( | $ | imageObject, |
| $ | filterData, | ||
| &$ | filterVariables, | ||
| $ | sourceMimeData, | ||
| $ | destinationMimeData | ||
| ) |
Changes the colors of the image based on the luminance. The new scale for the colors are based on the name of the filters.
Definition at line 300 of file ezimagegdhandler.php.
| eZImageGDHandler::$Executable |
Definition at line 770 of file ezimagegdhandler.php.
| eZImageGDHandler::$Path |
Definition at line 769 of file ezimagegdhandler.php.
| eZImageGDHandler::$PostParameters |
Definition at line 772 of file ezimagegdhandler.php.
| eZImageGDHandler::$PreParameters |
Definition at line 771 of file ezimagegdhandler.php.