mirror of
https://github.com/Intervention/image.git
synced 2025-08-01 11:30:16 +02:00
Fix bug
This commit is contained in:
@@ -16,7 +16,7 @@ class ResizeModifier implements ModifierInterface
|
||||
|
||||
public function apply(ImageInterface $image): ImageInterface
|
||||
{
|
||||
$resizeTo = $image->size()->resize($this->width, $this->height);
|
||||
$resizeTo = $this->getAdjustedSize($image);
|
||||
|
||||
foreach ($image as $frame) {
|
||||
$this->resizeFrame($frame, $resizeTo);
|
||||
@@ -25,6 +25,11 @@ class ResizeModifier implements ModifierInterface
|
||||
return $image;
|
||||
}
|
||||
|
||||
protected function getAdjustedSize(ImageInterface $image): SizeInterface
|
||||
{
|
||||
return $image->size()->resize($this->width, $this->height);
|
||||
}
|
||||
|
||||
protected function resizeFrame(FrameInterface $frame, SizeInterface $resizeTo): void
|
||||
{
|
||||
// create new image
|
||||
|
Reference in New Issue
Block a user