fix: -flatten flag should come after the input file in preset ImageMagick previewer (#3339)

Co-authored-by: 三咲雅 misaki masa <sxyazi@gmail.com>
This commit is contained in:
walldmtd 2025-11-18 23:26:35 -06:00 committed by GitHub
parent f9abe886cc
commit 9cd742811a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,11 +25,11 @@ function M:preload(job)
return true
end
local cmd = M.with_limit()
local cmd = M.with_limit():arg(tostring(job.file.url))
if job.args.flatten then
cmd:arg("-flatten")
end
cmd:arg { tostring(job.file.url), "-auto-orient", "-strip" }
cmd:arg { "-auto-orient", "-strip" }
local size = string.format("%dx%d>", rt.preview.max_width, rt.preview.max_height)
if rt.preview.image_filter == "nearest" then