Mango is a powerful command-line tool that converts images into ASCII art and displays them in the terminal with advanced color support.
- Supports multiple image formats (PNG, JPEG, BMP, JPG, JFIF, GIF)
- True Color support for more accurate color representation (16 million colors)
- Customizable padding for output
- Adjustable maximum width for resizing large images
- Colored output using terminal escape sequences
- Bold output characters for improved visibility
- Cross-platform compatibility (Windows and Linux)
- Simple and intuitive command-line interface
- Terminal with color support (True Color support recommended)
- C compiler (GCC or Clang recommended)
- Git
Before building the project, you need to clone the stb repository to get the required header files:
-
Open a terminal and navigate to the project root directory.
-
Run the following command to clone the
stbrepository into thesrc/stbdirectory:git clone https://github.com/nothings/stb src/stbThis will create a
src/stbdirectory containing all the necessary header files, includingstb_image.handstb_image_resize2.h.
After building the project, you can run Mango with the following syntax:
./mango [options] <file-path>
-p, --pad <value>: Set padding (default: 1)-w, --width <value>: Set maximum width (default: console width)-t, --true-color: Enable True Color mode-v, --version: Display version information-h, --help: Display help message
-
Convert an image with default settings:
./mango image.png -
Convert an image with custom padding and width:
./mango -p 2 -w 100 image.jpg -
Convert an image using True Color mode:
./mango -t image.gif
For a detailed list of changes and version history, please see the CHANGELOG.md file.
This project is licensed under the MIT License - see the LICENSE file for details.
- stb library for image loading and resizing
- Inspired by various terminal-based image viewers