From f4c43f524500b97c025907c2984737baddeb9232 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Mon, 18 Oct 2021 11:11:27 +0545 Subject: [PATCH] fix top-left gravity --- src/Image/Image.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Image/Image.php b/src/Image/Image.php index 1461d01..a51c1c5 100644 --- a/src/Image/Image.php +++ b/src/Image/Image.php @@ -106,6 +106,7 @@ public function crop(int $width, int $height, string $gravity = Image::GRAVITY_C case self::GRAVITY_TOP_LEFT: $x = 0; $y = 0; + break; case self::GRAVITY_TOP: $x = ($resizeWidth / 2) - ($width / 2); break;