mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
fix: respect PREVIEW.image_quality for the default PDF previewer (#2006)
Co-authored-by: sxyazi <sxyazi@gmail.com>
This commit is contained in:
parent
3bd625a8af
commit
adb1426539
2 changed files with 10 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ function M:preload(job)
|
|||
"-resize",
|
||||
string.format("%dx%d^", PREVIEW.max_width, PREVIEW.max_height),
|
||||
"-quality",
|
||||
tostring(PREVIEW.image_quality),
|
||||
PREVIEW.image_quality,
|
||||
"-auto-orient",
|
||||
"JPG:" .. tostring(cache),
|
||||
}):status()
|
||||
|
|
|
|||
|
|
@ -26,7 +26,15 @@ function M:preload(job)
|
|||
end
|
||||
|
||||
local output = Command("pdftoppm")
|
||||
:args({ "-singlefile", "-jpeg", "-jpegopt", "quality=75", "-f", tostring(job.skip + 1), tostring(job.file.url) })
|
||||
:args({
|
||||
"-singlefile",
|
||||
"-jpeg",
|
||||
"-jpegopt",
|
||||
"quality=" .. PREVIEW.image_quality,
|
||||
"-f",
|
||||
job.skip + 1,
|
||||
tostring(job.file.url),
|
||||
})
|
||||
:stdout(Command.PIPED)
|
||||
:stderr(Command.PIPED)
|
||||
:output()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue