Skip to content

Commit

Permalink
Fix type conversion with GD drivers image resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Oct 28, 2023
1 parent 0f846ce commit 63fd3d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Drivers/Gd/Modifiers/ResolutionModifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ public function __construct(protected float $x, protected float $y)

public function apply(ImageInterface $image): ImageInterface
{
$x = intval(round($this->x));
$y = intval(round($this->y));

foreach ($image as $frame) {
imageresolution($frame->core(), $this->x, $this->y);
imageresolution($frame->core(), $x, $y);
}

return $image;
Expand Down

0 comments on commit 63fd3d5

Please sign in to comment.