You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Advanced Dithering**: Implements Floyd-Steinberg dithering for improved image quality in terminals with limited color support
18
20
-**ASCII Art Logos**: Display custom ASCII art logos alongside system information
19
21
-**Customizable UI**: Configure colors, layout, and information displayed
20
22
-**Cross-Platform**: Works on various Linux distributions
@@ -164,18 +166,26 @@ LunarFetch can be configured using a JSON configuration file located at `~/.conf
164
166
-`random`: Randomly select an image from the `imagePath` directory (`true` or `false`)
165
167
-`imagePath`: Path to image file or directory (for random selection)
166
168
-`width`/`height`: Dimensions in terminal characters
167
-
-`renderMode`: Image rendering detail level (`"detailed"`, `"simple"`, `"block"`, or `"ascii"`)
168
-
-`ditherMode`: Dithering algorithm (`"none"` or `"floyd-steinberg"`)
169
+
-`renderMode`: Image rendering detail level:
170
+
-`"detailed"`: Highest quality rendering with maximum detail
171
+
-`"simple"`: Simplified rendering with less detail
172
+
-`"block"`: Uses block characters for better terminal compatibility
173
+
-`"ascii"`: Converts image to ASCII characters only
174
+
-`ditherMode`: Dithering algorithm:
175
+
-`"none"`: No dithering applied
176
+
-`"floyd-steinberg"`: Floyd-Steinberg dithering for better color representation
169
177
-`terminalOutput`: Output to terminal directly (`true` or `false`)
170
-
-`displayMode`: How to display the image (`"auto"`, `"block"`, or `"ascii"`)
178
+
-`displayMode`: How to display the image:
179
+
-`"auto"`: Automatically select the best display mode
180
+
-`"block"`: Use block characters for display
181
+
-`"ascii"`: Use ASCII characters only
171
182
-`protocol`: Image display protocol:
172
-
-`"auto"`: Auto-detect the best protocol
173
-
-`"sixel"`: For terminals with Sixel support
174
-
-`"kitty"`: For Kitty terminal
183
+
-`"auto"`: Auto-detect the best protocol for your terminal
184
+
-`"sixel"`: For terminals with Sixel support (like xterm with sixel extension)
185
+
-`"kitty"`: For Kitty terminal using its graphics protocol
175
186
-`"iterm2"`: For iTerm2 terminal on macOS
176
-
-`"chafa"`: Uses the Chafa tool
187
+
-`"chafa"`: Uses the Chafa tool (most compatible option)
177
188
-`"uberzug"`: Uses Überzug (Linux only)
178
-
-`"terminal-image"`: Uses the terminal-image tool
179
189
-`scale`: Image scaling factor (integer)
180
190
-`offset`: Offset from terminal edge (integer)
181
191
-`background`: Background color (`"transparent"` or a color value)
@@ -433,6 +443,50 @@ Set any option to `false` to hide that specific information.
433
443
```
434
444
</details>
435
445
446
+
## 🎨 Image Rendering and Dithering
447
+
448
+
LunarFetch supports various image rendering techniques to display images in your terminal.
449
+
450
+
### Supported Image Formats
451
+
452
+
- PNG (`.png`)
453
+
- JPEG (`.jpg`, `.jpeg`)
454
+
- WebP (`.webp`)
455
+
456
+
### Image Rendering Protocols
457
+
458
+
LunarFetch supports multiple protocols for rendering images in the terminal:
459
+
460
+
1.**Chafa**: The most compatible option that works in virtually any terminal. Chafa converts images to colored text characters.
461
+
462
+
2.**Sixel**: A graphics format supported by terminals like xterm with sixel extension, mlterm, and mintty.
463
+
464
+
3.**Kitty Graphics Protocol**: A modern protocol for displaying images in the Kitty terminal.
465
+
466
+
4.**iTerm2 Graphics Protocol**: For displaying images in iTerm2 on macOS.
467
+
468
+
5.**Uberzug**: A Linux-specific tool for displaying images in the terminal.
469
+
470
+
### Understanding Dithering
471
+
472
+
Dithering is a technique used in image processing to create the illusion of color depth in images with a limited color palette. LunarFetch implements the Floyd-Steinberg dithering algorithm, which works as follows:
473
+
474
+
1.**Color Reduction**: When displaying images in terminals with limited color capabilities, dithering helps maintain visual quality while reducing the number of colors used.
475
+
476
+
2.**Error Diffusion**: The algorithm processes each pixel, finds the closest available color, and distributes the error (difference) to neighboring pixels according to a specific pattern:
477
+
```
478
+
X 7/16
479
+
3/16 5/16 1/16
480
+
```
481
+
Where X is the current pixel, and the fractions represent how much of the error is distributed to each neighboring pixel.
482
+
483
+
3.**Visual Benefits**: Dithering creates patterns of dots that, when viewed from a distance, appear to have more colors than are actually used. This is particularly useful for:
484
+
- Smooth gradients
485
+
- Detailed images
486
+
- Photos with subtle color variations
487
+
488
+
To enable dithering, set `"ditherMode": "floyd-steinberg"` in your configuration.
489
+
436
490
## 🤝 Contributing
437
491
438
492
Contributions are welcome! Please feel free to submit a Pull Request.
0 commit comments