<?php
declare(strict_types=1);
namespace InterventionImageModifiers;
use InterventionImageInterfacesImageInterface;
use InterventionImageInterfacesSizeInterface;
class PadModifier extends ContainModifier
{
public function getCropSize(ImageInterface $image): SizeInterface
{
return $image->size()
->containMax(
$this->width,
$this->height
)
->alignPivotTo(
$this->getResizeSize($image),
$this->position
);
}
}