moonsflyer 4 ماه پیش
والد
کامیت
c77e1b4222
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      app/common/service/ImageCompressService.php

+ 2 - 1
app/common/service/ImageCompressService.php

@@ -17,6 +17,7 @@ class ImageCompressService
     public static function compress($sourcePath, $quality = 80, $maxWidth = 1920, $maxHeight = 1080)
     {
         try {
+            outFileLog($sourcePath,'upload_img','$sourcePath1');
             // 获取图片信息
             $imageInfo = getimagesize($sourcePath);
             outFileLog($imageInfo,'upload_img','imgInfo');
@@ -33,7 +34,7 @@ class ImageCompressService
             if ($width <= $maxWidth && $height <= $maxHeight && $quality >= 90) {
                 return $sourcePath;
             }
-            outFileLog($sourcePath,'upload_img','$sourcePath');
+            outFileLog($sourcePath,'upload_img','$sourcePath2');
             // 计算新尺寸
             $newSize = self::calculateNewSize($width, $height, $maxWidth, $maxHeight);
             $newWidth = $newSize['width'];