PHP 클래스 Neos\Media\Domain\Model\Adjustment\ResizeImageAdjustment

상속: extends AbstractImageAdjustment
파일 보기 프로젝트 열기: neos/neos-development-collection

보호된 프로퍼티들

프로퍼티 타입 설명
$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