Home

Awesome

<div align="center">

<img src="img2ascii.png">

A command-line tool for converting images to ASCII art

Made with C MIT License GitHub stars

</div>

๐Ÿ› ๏ธ Installation

# Clone the repository
git clone https://github.com/JosefVesely/img2ascii

# Navigate to the project directory
cd img2ascii

# Compile the program
make

๐Ÿš€ Usage

Run using the following syntax:

img2ascii [options] -i <FILE> [-o <FILE>]

Options:

ShortLongParameterDescription
-i--inputFilePath of the input image file (required)
-o--outputFilePath of the output file
-w--widthNumberWidth of the output image
-c--charsStringCharacters to be used for the ASCII image
-p--printPrint the output to the console
-r--reverseReverse the string of characters

๐Ÿงฉ Examples

InputOutput
<img src="images/c.png" width="300"><img src="examples/ascii-c.png" width="500">
img2ascii -i images/c.png -w 40 -p
<img src="images/monroe.jpg" width="300"><img src="examples/ascii-monroe.png" width="500">
img2ascii -i images/monroe.jpg -w 35 -p -r
<img src="images/pink_floyd.jpg" width="300"><img src="examples/ascii-pink_floyd.png" width="500">
img2ascii -i images/pink_floyd.jpg -w 80 -p -r
<img src="images/pepsi.png" width="300"><img src="examples/ascii-pepsi.png" width="500">
img2ascii -i images/pepsi.png -w 35 -p -r
<img src="images/aperture.jpg" width="300"><img src="examples/ascii-aperture.png" width="500">
img2ascii -i images/aperture.jpg -w 50 -p

๐Ÿงช Compatibility

The supported image file formats are PNG, JPEG and BMP

This program has been tested and works on the following operating systems:

๐Ÿค Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request

๐Ÿ“œ License

This project is licensed under the MIT License