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 {