/ACIIFY

ACIIFY is a tool used to convert images into ASCII art

Primary LanguageGo

ACIIFY

ACIIFY is a tool used to convert images into ASCII art and print them onto the console.

Input Formats currently Supported:

  • PNG
  • JPEG

Index

Installation Instructions

  1. Install go. Installation instructions for it are here
  2. Fork the Repository.
  3. Clone the repository in your local environment.
  4. Go to the directory and run go build ./main.go
  5. Then, run go run ./main.go -f ./data/golang.png -r 0.1 -c

CLI usage

usage: TODO

options:
  -help
        show this help message and exit
  -c    Display ASCII art in color     
  -f string
        Image Path to Convert
  -p    Display Pixelated art
  -r float
        Ratio to Scale the given Image (default 1)

-f FILENAME

Specify path to file (jpeg, png) you want to convert into ASCII art.

go run ./main.go -f ./data/<image>

NOTE:./data/ is the folder within the project folder you can add images there or change that as well refer Example 2

Example:

go run ./main.go -f ./data/gradient.png

Example 2 Another folder from your pc:

go run ./main.go -f ./hacktober/2022 Hacktoberfest Event Kit/Email Banners

NOTE: Most of the time, running without ratio results in very large ASCII arts. So, always try with -r 0.1 flag.

-r RATIO (default 1)

Ratio to Scale the given Image into

go run ./main.go -f ./data/<image> -r <ratio to scale into>

Example:

go run ./main.go -f ./data/golang.png -r 0.1

-c COLOR

This option is used to display the ASCII art in color (256).

go run ./main.go -f ./data/<image> -c

Example:

go run ./main.go -f ./data/golang.png -r 0.1 -c

-p PIXELATED

This option is used to display Pixelated art of the given image.

go run ./main.go -f ./data/<image> -p

To print colored Pixelated art, use -c with -p.

go run ./main.go -f ./data/<image> -r 0.1 -p -c

Example:

go run ./main.go -f ./data/gradient.png -r 0.1 -c -p

Sample Outputs

Image ASCII Art

Contributing

You can fork the project and implement the changes you want for a pull request.

Contributions are Welcome! :)