From 0daa5df64470636d62ab17b6dd6deea64e8e9617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E9=9B=85=20misaki=20masa?= Date: Sat, 20 Jun 2026 10:29:24 +0800 Subject: [PATCH] fix: use WebP as `magick` preset preloader cache format to keep image transparency (#4065) --- CHANGELOG.md | 5 ++++- yazi-plugin/preset/plugins/magick.lua | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6c209e3..2676d03c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/): ### Fixed -- Keep package hashes indifferent to line endings when `ya pkg` pulls packages +- Keep package hashes indifferent to line endings when `ya pkg` pulls packages ([#4064]) +- Use WebP as `magick` preset preloader cache format to keep image transparency ([#4065]) ### Improved @@ -1750,3 +1751,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/): [#4022]: https://github.com/sxyazi/yazi/pull/4022 [#4031]: https://github.com/sxyazi/yazi/pull/4031 [#4040]: https://github.com/sxyazi/yazi/pull/4040 +[#4064]: https://github.com/sxyazi/yazi/pull/4064 +[#4065]: https://github.com/sxyazi/yazi/pull/4065 diff --git a/yazi-plugin/preset/plugins/magick.lua b/yazi-plugin/preset/plugins/magick.lua index 80257838..15993771 100644 --- a/yazi-plugin/preset/plugins/magick.lua +++ b/yazi-plugin/preset/plugins/magick.lua @@ -49,7 +49,7 @@ function M:preload(job) cmd:arg { "-background", job.args.bg, "-alpha", "remove" } end - local status, err = cmd:arg(string.format("JPG:%s", cache)):status() + local status, err = cmd:arg(string.format("WEBP:%s", cache)):status() if not status then return true, Err("Failed to start `magick`, error: %s", err) elseif not status.success then