listen ansichten verbessert
This commit is contained in:
@@ -143,8 +143,12 @@ trait ImageUploadTrait
|
||||
$scale = min($width / $srcWidth, $height / $srcHeight);
|
||||
$dstWidth = (int) round($srcWidth * $scale);
|
||||
$dstHeight = (int) round($srcHeight * $scale);
|
||||
if ($dstWidth < 1) $dstWidth = 1;
|
||||
if ($dstHeight < 1) $dstHeight = 1;
|
||||
if ($dstWidth < 1) {
|
||||
$dstWidth = 1;
|
||||
}
|
||||
if ($dstHeight < 1) {
|
||||
$dstHeight = 1;
|
||||
}
|
||||
|
||||
$dst = imagecreatetruecolor($dstWidth, $dstHeight);
|
||||
if ($ext === 'png' || $ext === 'webp') {
|
||||
|
||||
Reference in New Issue
Block a user