From 5568ec1ec900e1908502511f0ed908a8cc3cb592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=99=E8=BF=B0=E3=80=81=E5=88=AB=E7=A6=BB?= <93301500+xushubieli@users.noreply.github.com> Date: Thu, 13 Feb 2025 21:31:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=BE=E7=89=87=E6=B0=B4?= =?UTF-8?q?=E5=8D=B0=E6=96=87=E5=AD=97=E9=A2=9C=E8=89=B2=EF=BC=8C=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=E7=BC=A9=E7=95=A5=E5=9B=BE=E6=9D=A1=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E5=89=8D=E5=8F=B0=E6=A0=B7=E5=BC=8F=E6=8E=A7=E5=88=B6=E5=8D=B3?= =?UTF-8?q?=E5=8F=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/system/helpers/image.helper.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/system/helpers/image.helper.php b/src/system/helpers/image.helper.php index d2f2c5ff..27addcf7 100755 --- a/src/system/helpers/image.helper.php +++ b/src/system/helpers/image.helper.php @@ -84,8 +84,8 @@ if (!function_exists('WaterImg')) { } $info = ''; $srcInfo = @getimagesize($srcFile, $info); - $srcFile_w = $srcInfo[0]; - $srcFile_h = $srcInfo[1]; + $srcFile_w = $srcInfo[0]; + $srcFile_h = $srcInfo[1]; if ($srcFile_w < $photo_wwidth || $srcFile_h < $photo_wheight) { return; } @@ -112,8 +112,8 @@ if (!function_exists('WaterImg')) { } $cfg_watermarktext['text'] = $photo_watertext; $cfg_watermarktext['size'] = $photo_fontsize; + $cfg_watermarktext['color'] = $photo_fontcolor; $cfg_watermarktext['angle'] = '0'; - $cfg_watermarktext['color'] = '255,255,255'; $cfg_watermarktext['shadowx'] = '0'; $cfg_watermarktext['shadowy'] = '0'; $cfg_watermarktext['shadowcolor'] = '0,0,0'; @@ -123,7 +123,7 @@ if (!function_exists('WaterImg')) { } } /** - * 会对空白地方填充满 + * 对空白地方填充满 * * @access public * @param string $srcFile 图片路径 @@ -138,7 +138,7 @@ if (!function_exists('ImageResizeNew')) { { try { $image = new ImageResize($srcFile); - $image->resize($toW, $toH); + $image->resizeToBestFit($toW, $toH); if ($issave) { $image->save($toFile); } else {