ascii-converter
v1.1.5
Published
Convert images to high-quality ASCII art
Downloads
68
Readme
ascii-converter ·
A library for converting images into high-quality ASCII art.
It includes a command line interface (CLI) to convert images directly from the Command Prompt.
Installation
You can install this package using npm or yarn:
Locally:
$ npm i ascii-converter
$ yarn add ascii-converter
Globally:
$ npm i -g ascii-converter
$ yarn global add ascii-converter
Usage
const convertToASCII = require('ascii-converter').default; // CommonJS module
// or:
import convertToASCII from 'ascii-converter'; // ES6 module
/**
* Converts the local image "dog.png"
* into ASCII text, and logs it on
* the console.
*/
convertToASCII('dog.png')
.then(ascii => console.log(ascii))
.catch(console.error);
To use the CLI, this package must be installed globally. Then, you can run the following command:
$ ascii
This should show a menu to select a local image.
Contributing
You can open pull requests on the project's GitHub repository, or make issues for major changes.