perf: refactor magick arguments

This commit is contained in:
ze0987 2025-03-25 17:47:38 +01:00 committed by GitHub
parent aedfe766c5
commit 8efa77eb07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,15 +25,14 @@ function M:preload(job)
end
local cmd = Command("magick"):args {
"-density",
200,
tostring(job.file.url),
"-auto-orient",
"-strip",
"-sample",
string.format("%dx", rt.preview.max_width),
"-flatten",
"-resize",
string.format("%dx%d^", rt.preview.max_width, rt.preview.max_height),
"-quality",
rt.preview.image_quality,
"-auto-orient",
"JPG:" .. tostring(cache),
}