ImageEditorTransformerInterface
- Type
- Interface
- Namespace
- craft\base\imagetransforms
- Implemented by
- craft\imagetransforms\ImageTransformer
- Since
- 4.0.0
ImageEditorTransformerInterface defines the common interface to be implemented by image drivers that support the Image Editor
View source (opens new window)
# Public Methods
Method | Description |
---|---|
cancelImageEditing() | Aborts the image editing process and returns the location of a temporary file that was created. |
crop() | Crops the image. |
finishImageEditing() | Completes an image editing process and returns the file location of the resulting image; |
flipImage() | Flips the image. |
getEditedImageHeight() | Returns the current height of the edited image. |
getEditedImageWidth() | Returns the current width of the edited image. |
rotateImage() | Rotates the image. |
scaleImage() | Scales the image. |
startImageEditing() | Begins an image editing process. |
# cancelImageEditing()
Aborts the image editing process and returns the location of a temporary file that was created.
View source (opens new window)
Returns
# crop()
Crops the image.
View source (opens new window)
Arguments
$x
(integer (opens new window))$y
(integer (opens new window))$width
(integer (opens new window))$height
(integer (opens new window))
# finishImageEditing()
Completes an image editing process and returns the file location of the resulting image;
View source (opens new window)
Returns
# flipImage()
Flips the image.
View source (opens new window)
Arguments
$flipX
(boolean (opens new window))$flipY
(boolean (opens new window))
# getEditedImageHeight()
Returns the current height of the edited image.
View source (opens new window)
Returns
integer (opens new window) – $height
# getEditedImageWidth()
Returns the current width of the edited image.
View source (opens new window)
Returns
integer (opens new window) – $width
# rotateImage()
Rotates the image.
View source (opens new window)
Arguments
$degrees
(float (opens new window))
# scaleImage()
Scales the image.
View source (opens new window)
Arguments
$width
(integer (opens new window))$height
(integer (opens new window))
# startImageEditing()
Begins an image editing process.
View source (opens new window)
Arguments
$asset
(craft\elements\Asset)