JonoM\FocusPoint\Extensions\FocusPointImageExtension
FocusPoint Image extension.
Extends Image to allow automatic cropping from a selected focus point.
Synopsis
class FocusPointImageExtension
extends FocusPointExtension
{
- // members
- private static array $db = ;
- // methods
- public void requireDefaultRecords()
- public void onBeforeWrite()
- // Inherited methods from FocusPointExtension
- public DBHTMLText DebugFocusPoint()
- public Image|DBFile|null FocusFillMax()
- public Image|DBFile|null FocusCropWidth()
- public Image|DBFile|null FocusCropHeight()
- public Image|DBFile|null FocusFill()
- protected string focusPointVariantName()
- protected DBFile|Image|null manipulateImageCropData()
Hierarchy
Members
private
-
$db
Describes the focus point coordinates on the image.
Methods
public
Inherited from JonoM\FocusPoint\Extensions\FocusPointExtension
protected
- focusPointVariantName() — Generate a focuspoint respective variant name
- manipulateImageCropData() — Manipulate helper, but ensure we have a FocusPoint field on the result
public
- DebugFocusPoint() — Debug output for this focus point image
- FocusCropHeight() — Crop an image to a maximum height, but will not make it taller
- FocusCropWidth() — Crop an image to a maximum width, but will not make it wider
- FocusFill() — Generate a resized copy of this image with the given width & height, cropping to maintain aspect ratio and focus point. Use in templates with $FocusFill.
- FocusFillMax() — Crop this image to the aspect ratio defined by the specified width and height, centred on focal point of image, then scale down the image to those dimensions if it exceeds them. Similar to FocusFill but without up-sampling. Use in templates with $FocusFillMax.