Skip to content

Commit 27aab75

Browse files
Merge branch 'refs/heads/main' into audio-features
2 parents df87ace + 5183a00 commit 27aab75

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Utils/Image.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ public function thumbnail(int $width, int $height, int|Resample $resample = 2):
174174
}
175175

176176
if ($inputHeight > $inputWidth) {
177-
$width = floor($inputWidth * $height / $inputHeight);
177+
$width = (int)floor($inputWidth * $height / $inputHeight);
178178
} elseif ($inputWidth > $inputHeight) {
179-
$height = floor($inputHeight * $width / $inputWidth);
179+
$height = (int)floor($inputHeight * $width / $inputWidth);
180180
}
181181

182182
return $this->resize($width, $height, $resample);
@@ -675,4 +675,4 @@ public function drawText(string $text, int|float $xPos, int|float $yPos, string
675675

676676
return new self($image, $this->channels);
677677
}
678-
}
678+
}

0 commit comments

Comments
 (0)