CropTrait
trait CropTrait
Trait CropTrait
Methods
The thumb cropping mode is specifically used for creating image thumbnails from either face or custom coordinates, and must always be accompanied by the gravity qualifier set to one of the face detection or custom values.
Details
static Crop
crop(int|float|string|null $width = null, int|float|null $height = null, Gravity $gravity = null, int|float|X $x = null, int|float|Y $y = null)
Extracts a region of the given width and height out of the original image.
static Crop
thumbnail(int|float|string|null $width = null, int|float|null $height = null, Gravity $gravity = null, int|float|X $x = null, int|float|Y $y = null)
The thumb cropping mode is specifically used for creating image thumbnails from either face or custom coordinates, and must always be accompanied by the gravity qualifier set to one of the face detection or custom values.
static Crop
auto(int|float|string|null $width = null, int|float|null $height = null, Gravity $gravity = null)
Automatically determines the best crop based on the gravity and specified dimensions.
If the requested dimensions are smaller than the best crop, the result is downscaled. If the requested dimensions are larger than the original image, the result is upscaled. Use this mode in conjunction with the g (gravity) parameter.