Skip to content

Commit

Permalink
Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Aug 5, 2024
1 parent ce4d2bc commit 839bc6a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Drivers/Gd/Cloner.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ public static function cloneEmpty(
ColorInterface $background = new Color(255, 255, 255, 0)
): GdImage {
// define size
$size = match (true) {
is_null($size) => new Rectangle(imagesx($gd), imagesy($gd)),
default => $size,
};
$size = $size ? $size : new Rectangle(imagesx($gd), imagesy($gd));

// create new gd image with same size or new given size
$clone = imagecreatetruecolor($size->width(), $size->height());
Expand Down

0 comments on commit 839bc6a

Please sign in to comment.