Use -resize instead of -sample for SVG preview

This commit is contained in:
sxyazi 2025-03-26 20:43:03 +08:00
parent 4e5e827412
commit 6a2b8e9299
No known key found for this signature in database

View file

@ -28,7 +28,7 @@ function M:preload(job)
local cmd = require("magick").with_env():args { local cmd = require("magick").with_env():args {
"-density", 200, "-density", 200,
tostring(job.file.url), "-strip", tostring(job.file.url), "-strip",
"-sample", string.format("%dx%d^", rt.preview.max_width, rt.preview.max_height), "-resize", string.format("%dx%d^", rt.preview.max_width, rt.preview.max_height),
"-quality", rt.preview.image_quality, "-quality", rt.preview.image_quality,
string.format("JPG:%s", cache), string.format("JPG:%s", cache),
} }