mirror of https://github.com/halo-dev/halo
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
parent
f6747327e9
commit
710777a10a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue