https://github.com/mrange/fsimagetosixel
Image to Sixel
https://github.com/mrange/fsimagetosixel
Last synced: 11 months ago
JSON representation
Image to Sixel
- Host: GitHub
- URL: https://github.com/mrange/fsimagetosixel
- Owner: mrange
- License: mit
- Created: 2024-09-22T08:02:21.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-07T08:12:10.000Z (about 1 year ago)
- Last Synced: 2025-07-15T01:45:29.791Z (12 months ago)
- Language: F#
- Size: 1.66 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FsImageToSixel.Tool
A .NET tool for converting standard images into **Sixel** format, which produces multicolored, pixelated images displayable in terminals that support it (e.g., Windows Terminal 1.22+).
For more information on Sixel, check out the [Wikipedia article](https://en.wikipedia.org/wiki/Sixel).
## Dependencies
1. **SixLabors.ImageSharp** – A powerful image processing library by SixLabors. ImageSharp is split-licensed under the Apache License 2.0 and a commercial license. For this open-source project, it qualifies for usage under the Apache 2.0 license, as it meets the criteria for open-source software use.
2. **System.CommandLine** – A command-line parser library from Microsoft, licensed under the MIT License.
## Build Instructions
```bash
cd src/FsImageToSixel.Tool
dotnet build -c Release
```
## How to run
```bash
cd src/FsImageToSixel.Tool
# -i: Specifies the input image file
# -s: Specifies the scale percentage
# -h: Use -h or --help to print the help
dotnet run -c Release -- -i ../../assets/dotnet-bot_branded.png -s 100
```
## Generate reference assets
Use cake:
```bash
dotnet tool run dotnet-cake -- --Target=GenerateReferenceAssets
```
Or do it manually:
```bash
cd src/FsImageToSixel.Tool
dotnet run -c Release -- -i ../../assets/dotnet-bot_branded.png -s 100 -o ../../assets/dotnet-bot_branded.txt -oo
dotnet run -c Release -- -i ../../assets/icon.png -s 100 -o ../../assets/icon.txt -oo
dotnet run -c Release -- -i ../../assets/cube1s.gif -s 100 -o ../../assets/cube1s.txt -oo
dotnet run -c Release -- -ei -i ../../assets/cube1s.gif -s 100 -o ../../assets/cube1s_.txt -oo
```