fix: magick >=7.1.2-28 preview of multiframe files

This commit is contained in:
Omenabaka 2026-07-19 01:24:49 +03:00
parent 6aadb3ff38
commit 7afc3effa3

View file

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