Code Monkey home page Code Monkey logo

image-to-ansi's Introduction

(Python) Image to ANSI Converter

Credit where credit is due.

This python script is based off of original work by Micah Elliott (MicahElliott) located in Gist colortrans.py which was then used to create image-to-ansi.py by K Lange (klange) and subsequently improved on by Takumi Sueda (puhitaku). A big thanks to those foundations.

Purpose

This script uses python libraries to provide a way to take image files and make them color compatible for use in a shell (ANSI). Which allows display of terminal art such as that contained in the demo.png file. The original colortrans.py file (not included here) provides a way to translate RGB values into ANSI compatible terminal codes (i.e. color included), find that script if you plan to do this all manually.

alt text

Prerequisites

Assumptions

Yeah yeah, I'm aware about assumptions but this isn't subtaintial enough that I'm going to put in undue effort on this. So, all instructions, suggestions, and guidance assume that you're using Debian/Ubuntu. This will also assume you are using a newer version of either distro. If you are using an older version change apt to apt-get where you find it.

  1. Python (if not already installed install by apt install python)
  2. python-pip (apt install python-pip)
  3. Pillow (pip install pillow)
  4. Image (pip install Image)

To-Do List

  • Review sizing of output. Currently images larger than 50x50 are not very practical for console use.
  • Update script to display help information on run without variable or --help option

Additional References/Resources

Prior Author Credits

image-to-ansi's People

Contributors

torrycrass avatar puhitaku avatar micahelliott avatar klange avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.