From 958bd48c3cfd22bb0c0b8191e5ea328332c58637 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Fri, 26 Jan 2024 22:42:26 +0800 Subject: [PATCH] docs: add image_filter option to yazi.md --- docs/configuration/yazi.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/configuration/yazi.md b/docs/configuration/yazi.md index bba1118d..1376568d 100644 --- a/docs/configuration/yazi.md +++ b/docs/configuration/yazi.md @@ -66,6 +66,16 @@ If you haven't created and used your own configuration file yet, please see [Con - max_width: Maximum preview width for images. Do a `yazi --clear-cache` to take effect after changing this. - max_height: Maximum preview height for images. Do a `yazi --clear-cache` to take effect after changing this. - cache_dir: The system cache directory is used by default, and the cached files will go away on a reboot automatically. If you want to make it more persistent, you can specify the cache directory manually as an absolute path. +- image_filter: The filters used on image downscaling, available values: + + - `"nearest"` - Nearest Neighbor + - `"triangle"` - Linear: Triangle + - `"catmull-rom"` - Catmull-Rom + - `"lanczos3"` - Lanczos with window 3 + + They are arranged in order from fast to slow, and from poor to good quality. Lanczos3 provides the highest quality but is also the slowest — it's 40 times slower than Nearest. + This means it requires a significant amount of CPU computation, so make sure you know what you're doing! + - image_quality: Quality on pre-caching images, range 50-90. The larger value, the better image quality, but slower with more CPU consumption, and generates larger cache files that occupy more storage space. - sixel_fraction: Sixel is a very old image format that only supports 256 colors. For better image preview, Yazi trains a neural network for each image to find the most representative colors. This value determines the number of samples used during the training, range 10-20. A smaller value produces better results but is also slower.