File: README.md

Recommend this page to a friend!
  Classes of Dom Hastings   JS Image to ANSI   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: JS Image to ANSI
Convert an image pixels to ANSI colour codes
Author: By
Last change: Update to TypeScript and bump dependencies.
Date: 2 years ago
Size: 531 bytes
 

Contents

Class file image Download

image-to-ansi

Having spent some time playing with colours in terminal, I wanted the ability to upload an image and have the content mapped to the closest colour from the ANSI terminal's 256 colour palette. Combined with the terminal preview mechanism I'd created as part of my bash-ps1 project, I've shared this tool. The image is never sent to the server as all the processing work is carried out in-browser by JavaScript.

Feel free to fork this, you can also see it in action here.