PHP 클래스 Imbo\Image\Transformation\SmartSize

저자: Espen Hovlandsdal ([email protected])
저자: Kristoffer Brabrand ([email protected])
상속: extends Transformation, implements Imbo\EventListener\ListenerInterface
파일 보기 프로젝트 열기: imbo/imbo 1 사용 예제들

공개 메소드들

메소드 설명
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