Skip to content

Commit

Permalink
docs: add image_filter option to yazi.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Jan 26, 2024
1 parent 5487cbc commit 958bd48
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/configuration/yazi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 958bd48

Please sign in to comment.