fix: use WEBP as magick preset preloader output format to keep image transparency

This commit is contained in:
sxyazi 2026-06-20 10:24:49 +08:00
parent 6144d2748e
commit b354854c79
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View file

@ -32,7 +32,7 @@ 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])
### Improved
@ -1750,3 +1750,4 @@ 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

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