From 9cd742811a4aa9c87d36bf0f69db07ab0a187eb8 Mon Sep 17 00:00:00 2001 From: walldmtd <85672104+walldmtd@users.noreply.github.com> Date: Tue, 18 Nov 2025 23:26:35 -0600 Subject: [PATCH] fix: `-flatten` flag should come after the input file in preset ImageMagick previewer (#3339) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 三咲雅 misaki masa --- yazi-plugin/preset/plugins/magick.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yazi-plugin/preset/plugins/magick.lua b/yazi-plugin/preset/plugins/magick.lua index df9b6375..ce3e7e49 100644 --- a/yazi-plugin/preset/plugins/magick.lua +++ b/yazi-plugin/preset/plugins/magick.lua @@ -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