PHP Interface Neos\Media\Domain\Model\ImageInterface

Inheritance: extends Neos\Media\Domain\Model\ResourceBasedInterface
Show file Open project: neos/neos-development-collection Interface Usage Examples

Public Methods

Method Description
getAspectRatio ( boolean $respectOrientation = false ) : float Edge / aspect ratio of the image
getHeight ( ) : integer Height of the image in pixels
getOrientation ( ) : string Orientation of this image, i.e. portrait, landscape or square
getWidth ( ) : integer Width of the image in pixels
isOrientationLandscape ( ) : boolean Whether this image is in landscape orientation
isOrientationPortrait ( ) : boolean Whether this image is in portrait orientation
isOrientationSquare ( ) : boolean Whether this image is square aspect ratio and therefore has a square orientation

Method Details

getAspectRatio() public method

Edge / aspect ratio of the image
public getAspectRatio ( boolean $respectOrientation = false ) : float
$respectOrientation boolean If false (the default), orientation is disregarded and always a value >= 1 is returned (like usual in "4 / 3" or "16 / 9")
return float

getHeight() public method

Height of the image in pixels
public getHeight ( ) : integer
return integer

getOrientation() public method

Orientation of this image, i.e. portrait, landscape or square
public getOrientation ( ) : string
return string One of this interface's ORIENTATION_* constants.

getWidth() public method

Width of the image in pixels
public getWidth ( ) : integer
return integer

isOrientationLandscape() public method

Whether this image is in landscape orientation
public isOrientationLandscape ( ) : boolean
return boolean

isOrientationPortrait() public method

Whether this image is in portrait orientation
public isOrientationPortrait ( ) : boolean
return boolean

isOrientationSquare() public method

Whether this image is square aspect ratio and therefore has a square orientation
public isOrientationSquare ( ) : boolean
return boolean