Px2ansi Save

Pixel Art to ANSI Art conversion

Project README

Convert Pixel Art image to Text Art !

For all your needs to print fancy pixel art to your terminal.

About

This tool convert pixel art image to text art using ANSI escape codes. Motivated by the discovery of arttime, and the desire to use my own custom pixel arts with it. I've searched for a good converter but didn't find what i was looking for so this was an opportunity to make my own.

Compatible with any terminal supporting 24-bit ANSI Escape code and unicode characters.

Installation

Installation is not mandatory, if you want to use Px2ANSI without installation, see the Non-Install Use below.

Px2ANSI isn't distributed with package managers, but fortunately, it is still very easy to install:

git clone https://github.com/Nellousan/px2ansi.git
cd px2ansi
pip3 install .

This will install Px2ANSI to your pip install path under the name px2ansi.

To uninstall Px2ANSI:

pip3 uninstall px2ansi

How to use

Basic usage:

px2ansi your_image.png

This will print directly to the terminal, if you want to save it to a file you can use the > redirection operator or use:

px2ansi your_image.png -o your_file.txt

Once you saved the output to a file, no need to use Px2ANSI anymore, you can simply print the content of your file using cat your_file.txt, for example.

More features to come.

Non-Install Use

It is also possible to use Px2ANSI without installing it by running px2ansi.py like any other python script. First, be sure to have the dependencies installed:

pip3 install -r requirements.txt

Now, you can simply run python3 px2ansi.py just like yoo would do with px2ansi. For example:

python3 px2ansi.py your_image.png

You can also move px2ansi.py somewhere else on your machine since it is a standalone script.

Roadmap

  • Add a feature for default background color
  • Add support for transparent pixel (between 0-255 alpha)
  • Make a setup script for installation
  • Make the first proper release

License

Distributed under the GNU General Public License v3.0

Contact

Twitter - @Nellousan
Email - [email protected]

Open Source Agenda is not affiliated with "Px2ansi" Project. README Source: Nellousan/px2ansi
Stars
51
Open Issues
1
Last Commit
1 year ago
Repository
License

Open Source Agenda Badge

Open Source Agenda Rating