refactor: change scalingMethod parameter to automatic for thumbnail generation (#6563)

#### What type of PR is this?

/area core
/kind improvement
/milestone 2.19.0

#### What this PR does / why we need it:

将缩略图生成的模式改为自动,速度优先会导致图片失真率较高,部分图片在 w1600 的尺寸下看起来会比较模糊。

#### Does this PR introduce a user-facing change?

```release-note
None
```
pull/6570/head
Ryan Wang 2024-09-01 22:49:34 +08:00 committed by GitHub
parent f6747327e9
commit 710777a10a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ public class ThumbnailGenerator {
throw new UnsupportedOperationException(
"Unsupported image format for: " + formatNameOpt.orElse("unknown"));
}
var thumbnail = Scalr.resize(img, Scalr.Method.SPEED, Scalr.Mode.FIT_TO_WIDTH,
var thumbnail = Scalr.resize(img, Scalr.Method.AUTOMATIC, Scalr.Mode.FIT_TO_WIDTH,
size.getWidth());
var formatName = formatNameOpt.orElse("jpg");
var thumbnailFile = getThumbnailFile(formatName);