fix: use WebP as magick preset preloader cache format to keep image transparency (#4065)

This commit is contained in:
三咲雅 misaki masa 2026-06-20 10:29:24 +08:00 committed by sxyazi
parent 6144d2748e
commit 0daa5df644
No known key found for this signature in database
2 changed files with 5 additions and 2 deletions

View file

@ -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

View file

@ -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