PHP Класс Neos\Media\Domain\Model\Adjustment\ResizeImageAdjustment

Наследование: extends AbstractImageAdjustment
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$allowUpScaling boolean
$height integer
$maximumHeight integer
$maximumWidth integer
$minimumHeight integer
$minimumWidth integer
$position integer
$ratioMode string One of the ImagineImageInterface::RATIOMODE_* constants
$width integer

Открытые методы

Метод Описание
applyToImage ( Imagine\Image\ImageInterface $image ) : Imagine\Image\ImageInterface Applies this adjustment to the given Imagine Image object
canBeApplied ( Imagine\Image\ImageInterface $image ) : boolean Check if this Adjustment can or should be applied to its ImageVariant.
getAllowUpScaling ( ) : boolean Returns allowUpScaling
getHeight ( ) : integer Returns height
getMaximumHeight ( ) : integer Returns maximumHeight
getMaximumWidth ( ) : integer Returns maximumWidth
getMinimumHeight ( ) : integer Returns minimumHeight
getMinimumWidth ( ) : integer Returns minimumWidth
getRatioMode ( ) : string Returns ratioMode
getWidth ( ) : integer Returns width
setAllowUpScaling ( boolean $allowUpScaling ) : void Sets allowUpScaling
setHeight ( integer $height ) : void Sets height
setMaximumHeight ( integer $maximumHeight ) : void Sets maximumHeight
setMaximumWidth ( integer $maximumWidth ) : void Sets maximumWidth
setMinimumHeight ( integer $minimumHeight ) : void Sets minimumHeight
setMinimumWidth ( integer $minimumWidth ) : void Sets minimumWidth
setRatioMode ( string $ratioMode ) : void Sets ratioMode
setWidth ( integer $width ) : void Sets width

Защищенные методы

Метод Описание
calculateDimensions ( Imagine\Image\BoxInterface $originalDimensions ) : Imagine\Image\BoxInterface Calculates and returns the dimensions the image should have according all parameters set in this adjustment.
calculateOutboundBox ( Imagine\Image\BoxInterface $originalDimensions, integer $requestedWidth, integer $requestedHeight ) : Imagine\Image\BoxInterface Calculate the final dimensions for an outbound box. usually exactly the requested width and height unless that would require upscaling and it is not allowed.
calculateOutboundScalingDimensions ( Imagine\Image\BoxInterface $imageSize, Imagine\Image\BoxInterface $requestedDimensions ) : Imagine\Image\BoxInterface Calculates a resize dimension box that allows for outbound resize.
calculateScalingToHeight ( Imagine\Image\BoxInterface $originalDimensions, integer $requestedHeight ) : Imagine\Image\BoxInterface Calculates new dimensions with a requested height applied. Takes upscaling into consideration.
calculateScalingToWidth ( Imagine\Image\BoxInterface $originalDimensions, integer $requestedWidth ) : Imagine\Image\BoxInterface Calculates new dimensions with a requested width applied. Takes upscaling into consideration.
calculateWithFixedDimensions ( Imagine\Image\BoxInterface $originalDimensions, integer $requestedWidth, integer $requestedHeight ) : Imagine\Image\BoxInterface
resize ( Imagine\Image\ImageInterface $image, string $mode = ImageInterface::RATIOMODE_INSET, string $filter = ImagineImageInterface::FILTER_UNDEFINED ) : Imagine\Image\ManipulatorInterface Executes the actual resizing operation on the Imagine image.

Описание методов

applyToImage() публичный Метод

Applies this adjustment to the given Imagine Image object
public applyToImage ( Imagine\Image\ImageInterface $image ) : Imagine\Image\ImageInterface
$image Imagine\Image\ImageInterface
Результат Imagine\Image\ImageInterface

calculateDimensions() защищенный Метод

Calculates and returns the dimensions the image should have according all parameters set in this adjustment.
protected calculateDimensions ( Imagine\Image\BoxInterface $originalDimensions ) : Imagine\Image\BoxInterface
$originalDimensions Imagine\Image\BoxInterface Dimensions of the unadjusted image
Результат Imagine\Image\BoxInterface

calculateOutboundBox() защищенный Метод

Calculate the final dimensions for an outbound box. usually exactly the requested width and height unless that would require upscaling and it is not allowed.
protected calculateOutboundBox ( Imagine\Image\BoxInterface $originalDimensions, integer $requestedWidth, integer $requestedHeight ) : Imagine\Image\BoxInterface
$originalDimensions Imagine\Image\BoxInterface
$requestedWidth integer
$requestedHeight integer
Результат Imagine\Image\BoxInterface

calculateOutboundScalingDimensions() защищенный Метод

The scaled image will be bigger than the requested dimensions in one dimension and then cropped.
protected calculateOutboundScalingDimensions ( Imagine\Image\BoxInterface $imageSize, Imagine\Image\BoxInterface $requestedDimensions ) : Imagine\Image\BoxInterface
$imageSize Imagine\Image\BoxInterface
$requestedDimensions Imagine\Image\BoxInterface
Результат Imagine\Image\BoxInterface

calculateScalingToHeight() защищенный Метод

Calculates new dimensions with a requested height applied. Takes upscaling into consideration.
protected calculateScalingToHeight ( Imagine\Image\BoxInterface $originalDimensions, integer $requestedHeight ) : Imagine\Image\BoxInterface
$originalDimensions Imagine\Image\BoxInterface
$requestedHeight integer
Результат Imagine\Image\BoxInterface

calculateScalingToWidth() защищенный Метод

Calculates new dimensions with a requested width applied. Takes upscaling into consideration.
protected calculateScalingToWidth ( Imagine\Image\BoxInterface $originalDimensions, integer $requestedWidth ) : Imagine\Image\BoxInterface
$originalDimensions Imagine\Image\BoxInterface
$requestedWidth integer
Результат Imagine\Image\BoxInterface

calculateWithFixedDimensions() защищенный Метод

protected calculateWithFixedDimensions ( Imagine\Image\BoxInterface $originalDimensions, integer $requestedWidth, integer $requestedHeight ) : Imagine\Image\BoxInterface
$originalDimensions Imagine\Image\BoxInterface
$requestedWidth integer
$requestedHeight integer
Результат Imagine\Image\BoxInterface

canBeApplied() публичный Метод

Check if this Adjustment can or should be applied to its ImageVariant.
public canBeApplied ( Imagine\Image\ImageInterface $image ) : boolean
$image Imagine\Image\ImageInterface
Результат boolean

getAllowUpScaling() публичный Метод

Returns allowUpScaling
public getAllowUpScaling ( ) : boolean
Результат boolean

getHeight() публичный Метод

Returns height
public getHeight ( ) : integer
Результат integer

getMaximumHeight() публичный Метод

Returns maximumHeight
public getMaximumHeight ( ) : integer
Результат integer

getMaximumWidth() публичный Метод

Returns maximumWidth
public getMaximumWidth ( ) : integer
Результат integer

getMinimumHeight() публичный Метод

Returns minimumHeight
public getMinimumHeight ( ) : integer
Результат integer

getMinimumWidth() публичный Метод

Returns minimumWidth
public getMinimumWidth ( ) : integer
Результат integer

getRatioMode() публичный Метод

Returns ratioMode
public getRatioMode ( ) : string
Результат string

getWidth() публичный Метод

Returns width
public getWidth ( ) : integer
Результат integer

resize() защищенный Метод

In case of an outbound resize the image will be resized and cropped.
protected resize ( Imagine\Image\ImageInterface $image, string $mode = ImageInterface::RATIOMODE_INSET, string $filter = ImagineImageInterface::FILTER_UNDEFINED ) : Imagine\Image\ManipulatorInterface
$image Imagine\Image\ImageInterface
$mode string
$filter string
Результат Imagine\Image\ManipulatorInterface

setAllowUpScaling() публичный Метод

Sets allowUpScaling
public setAllowUpScaling ( boolean $allowUpScaling ) : void
$allowUpScaling boolean
Результат void

setHeight() публичный Метод

Sets height
public setHeight ( integer $height ) : void
$height integer
Результат void

setMaximumHeight() публичный Метод

Sets maximumHeight
public setMaximumHeight ( integer $maximumHeight ) : void
$maximumHeight integer
Результат void

setMaximumWidth() публичный Метод

Sets maximumWidth
public setMaximumWidth ( integer $maximumWidth ) : void
$maximumWidth integer
Результат void

setMinimumHeight() публичный Метод

Sets minimumHeight
public setMinimumHeight ( integer $minimumHeight ) : void
$minimumHeight integer
Результат void

setMinimumWidth() публичный Метод

Sets minimumWidth
public setMinimumWidth ( integer $minimumWidth ) : void
$minimumWidth integer
Результат void

setRatioMode() публичный Метод

Sets ratioMode
public setRatioMode ( string $ratioMode ) : void
$ratioMode string One of the \Neos\Media\Domain\Model\ImageInterface::RATIOMODE_* constants
Результат void

setWidth() публичный Метод

Sets width
public setWidth ( integer $width ) : void
$width integer
Результат void

Описание свойств

$allowUpScaling защищенное свойство

protected bool $allowUpScaling
Результат boolean

$height защищенное свойство

protected int $height
Результат integer

$maximumHeight защищенное свойство

protected int $maximumHeight
Результат integer

$maximumWidth защищенное свойство

protected int $maximumWidth
Результат integer

$minimumHeight защищенное свойство

protected int $minimumHeight
Результат integer

$minimumWidth защищенное свойство

protected int $minimumWidth
Результат integer

$position защищенное свойство

protected int $position
Результат integer

$ratioMode защищенное свойство

One of the ImagineImageInterface::RATIOMODE_* constants
protected string $ratioMode
Результат string

$width защищенное свойство

protected int $width
Результат integer