FillPadTrait
trait FillPadTrait
Trait FillPadTrait
Methods
fillPad(int|float|string|null $width = null, int|float|null $height = null, FocalGravity|string $gravity = null, string|ColorValue $background = null)
Tries to prevent a "bad crop" by first attempting to use the fill mode, but adding padding if it is determined that more of the original image needs to be included in the final image.
Details
static FillPad
fillPad(int|float|string|null $width = null, int|float|null $height = null, FocalGravity|string $gravity = null, string|ColorValue $background = null)
Tries to prevent a "bad crop" by first attempting to use the fill mode, but adding padding if it is determined that more of the original image needs to be included in the final image.
Especially useful if the aspect ratio of the delivered image is considerably different from the original's aspect ratio.
Only supported in conjunction with Automatic cropping (Gravity::auto())