fix: magick preview of multiframe files (#4024)

Co-authored-by: 三咲雅 misaki masa <sxyazi@gmail.com>
This commit is contained in:
Omenabaka 2026-07-19 18:58:16 +03:00 committed by GitHub
parent 52640fcece
commit 60d94608cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,9 +25,11 @@ function M:preload(job)
return true return true
end end
local cmd = M.with_limit():arg(tostring(job.file.path)) local cmd = M.with_limit():arg { "-define", "filename:literal=true" }
if job.args.flatten then if job.args.flatten then
cmd:arg("-flatten") cmd:arg { tostring(job.file.path), "-flatten" }
else
cmd:arg { "-define", "image:frames=0", tostring(job.file.path) }
end end
cmd:arg { "-auto-orient", "-strip" } cmd:arg { "-auto-orient", "-strip" }