PHP Класс Imbo\Image\Transformation\SmartSize

Автор: Espen Hovlandsdal ([email protected])
Автор: Kristoffer Brabrand ([email protected])
Наследование: extends Transformation, implements Imbo\EventListener\ListenerInterface
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
getSubscribedEvents ( )
transform ( Imbo\EventManager\EventInterface $event ) Transform the image

Приватные методы

Метод Описание
calculateCrop ( array $parameters ) : array Calculate the coordinates and size of the crop area
getGrowFactor ( $closeness ) Get the factor by which the crop area is grown in order to include stuff around the POI. The larger the factor, the wider the crop.
getPoiFromMetadata ( Imbo\EventManager\EventInterface $event, Image $image ) : array | false Fetch POI from metadata for the image
getSourcePercentageThreshold ( $closeness ) Get the threshold value that specifies the portion of the original width/height that the crop area should never go below.
resize ( Image $image, integer $targetWidth, $targetHeight ) Resize the image
simpleCrop ( Imbo\EventManager\EventInterface $event, integer $width, integer $height ) Perform a simple crop/resize operation on the image

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

getSubscribedEvents() публичный статический Метод

public static getSubscribedEvents ( )

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

Transform the image
public transform ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface The event instance