perf: 优化图片上传

This commit is contained in:
kuaifan
2024-11-18 14:33:31 +08:00
parent 42c77db1d4
commit ad3e773f27
13 changed files with 38 additions and 26 deletions

View File

@@ -2027,7 +2027,7 @@ class Base
if ($width > 0 || $height > 0) {
$scaleName = "_{WIDTH}x{HEIGHT}";
if (isset($param['scale'][2])) {
$scaleName .= "_c{$param['scale'][2]}";
$scaleName .= "_{$param['scale'][2]}";
}
}
}
@@ -2065,7 +2065,7 @@ class Base
$data = match ($exif['Orientation']) {
2 => imageflip($data, IMG_FLIP_HORIZONTAL),
3 => imagerotate($data, 180, 0),
4 => imageflip($data, IMG_FLIP_VERTICAL),
4 => imageflip($data, IMG_FLIP_VERTICAL),
5 => imageflip(imagerotate($data, -90, 0), IMG_FLIP_HORIZONTAL),
6 => imagerotate($data, -90, 0),
7 => imageflip(imagerotate($data, 90, 0), IMG_FLIP_HORIZONTAL),