Skip to content

Commit

Permalink
fix top-left gravity
Browse files Browse the repository at this point in the history
  • Loading branch information
lohanidamodar committed Oct 18, 2021
1 parent a7255ac commit f4c43f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Image/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f4c43f5

Please sign in to comment.