CropImageTransform
in package
implements
ImageTransform
Does image resizing, etc
Table of Contents
Interfaces
- ImageTransform
- Does image resizing, or whatever transforms wanted really.
Properties
- $height : mixed
- $horiz_pos : mixed
- $vert_pos : mixed
- $width : mixed
Methods
- __construct() : mixed
- Constructor
- estimateRamRequirement() : int
- Estimate the RAM requirement to run this transform
- transform() : bool
- Does the actual transform
Properties
$height
private
mixed
$height
$horiz_pos
private
mixed
$horiz_pos
$vert_pos
private
mixed
$vert_pos
$width
private
mixed
$width
Methods
__construct()
Constructor
public
__construct(int $width, int $height[, mixed $vert_pos = 'center' ][, mixed $horiz_pos = 'center' ]) : mixed
Parameters
- $width : int
-
The width to crop the image at.
- $height : int
-
The height to crop the image at.
- $vert_pos : mixed = 'center'
-
The position of the crop. A pixel value, or one of 'top', 'center' or 'bottom'.
- $horiz_pos : mixed = 'center'
-
The position of the crop. A pixel value, or one of 'left', 'center' or 'right'.
estimateRamRequirement()
Estimate the RAM requirement to run this transform
public
estimateRamRequirement() : int
Return values
int —Bytes
transform()
Does the actual transform
public
transform(Image $img) : bool
Parameters
- $img : Image
-
The image to transform
Return values
bool —True on success, false on error