From 63fd3d5fcaa22d43ede84681e2b4d99c8fced07f Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sat, 28 Oct 2023 10:48:58 +0200 Subject: [PATCH] Fix type conversion with GD drivers image resolution --- src/Drivers/Gd/Modifiers/ResolutionModifier.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Drivers/Gd/Modifiers/ResolutionModifier.php b/src/Drivers/Gd/Modifiers/ResolutionModifier.php index c33cf2d50..404e6a2bc 100644 --- a/src/Drivers/Gd/Modifiers/ResolutionModifier.php +++ b/src/Drivers/Gd/Modifiers/ResolutionModifier.php @@ -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;