ResizeImageTransform
in package
implements
ImageTransform
Does image resizing, etc
Table of Contents
Interfaces
- ImageTransform
- Does image resizing, or whatever transforms wanted really.
Properties
Methods
- __construct() : mixed
- Constructor
- estimateRamRequirement() : int
- Estimate the RAM requirement to run this transform
- getDimensions() : array<string|int, mixed>
- Gets the dimensions
- transform() : bool
- Does the actual transform
Properties
$height
private
mixed
$height
$master
private
mixed
$master
$upscale
private
mixed
$upscale
$width
private
mixed
$width
Methods
__construct()
Constructor
public
__construct(int|null $width, int|null $height[, int|null $master = null ][, bool|null $upscale = null ]) : mixed
Parameters
- $width : int|null
-
The width to resize the image to.
- $height : int|null
-
The height to resize the image to.
- $master : int|null = null
-
Optional master dimension. Image::WIDTH or Image::HEIGHT
- $upscale : bool|null = null
-
Optional. Null implies config
file.upscale_images
estimateRamRequirement()
Estimate the RAM requirement to run this transform
public
estimateRamRequirement() : int
Return values
int —Bytes
getDimensions()
Gets the dimensions
public
getDimensions() : array<string|int, mixed>
Return values
array<string|int, mixed> —Keys are width, height, and master; these match the constructor args
transform()
Does the actual transform
public
transform(Image $img) : bool
Parameters
- $img : Image
-
The image to transform