lh 1 dag geleden
bovenliggende
commit
726e42dba8
1 gewijzigde bestanden met toevoegingen van 8 en 8 verwijderingen
  1. 8 8
      app/Consts/BaseConst.php

+ 8 - 8
app/Consts/BaseConst.php

@@ -120,7 +120,7 @@ class BaseConst
      * 自定义尺寸约束(4k 档按此校准,长边尽量逼近 4k):
      * 1. 宽、高均须为 16 的倍数;
      * 2. 长边与短边比例介于 1:3 ~ 3:1;
-     * 3. 长边必须小于 3840,故 16 倍数中可取的最大长边为 3824
+     * 3. 长边不超过 3840(等于 3840 可用)
      * 4. 总像素数介于 655,360 ~ 8,294,400。
      */
     const IMAGE_RESOLUTION_SIZE_MAP = [
@@ -149,18 +149,18 @@ class BaseConst
             '1:2' => ['width' => 1536, 'height' => 3072],
         ],
         '4k' => [
-            // 4k ≈ 829 万像素上限,长边取小于 3840 的最大 16 倍数 3824
+            // 4k 受 829 万像素上限约束:长边能到 3840 的取 3840,够不到的取该比例下的最大可行值
             '1:1' => ['width' => 2880, 'height' => 2880],
             '3:4' => ['width' => 2480, 'height' => 3328],
             '4:3' => ['width' => 3328, 'height' => 2480],
-            '16:9' => ['width' => 3824, 'height' => 2144],
-            '9:16' => ['width' => 2144, 'height' => 3824],
+            '16:9' => ['width' => 3840, 'height' => 2160],
+            '9:16' => ['width' => 2160, 'height' => 3840],
             '2:3' => ['width' => 2336, 'height' => 3536],
             '3:2' => ['width' => 3536, 'height' => 2336],
-            // 21:9 长边已取 3824;短边取 1648 可保持总像素 ≥ 6MP,计费仍归入 4k 档
-            '21:9' => ['width' => 3824, 'height' => 1648],
-            '2:1' => ['width' => 3824, 'height' => 1920],
-            '1:2' => ['width' => 1920, 'height' => 3824],
+            // 21:9 长边取 3840,短边 1648 使总像素 ≥ 6MP,计费仍归入 4k 档
+            '21:9' => ['width' => 3840, 'height' => 1648],
+            '2:1' => ['width' => 3840, 'height' => 1920],
+            '1:2' => ['width' => 1920, 'height' => 3840],
         ],
     ];