Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/syzer/img2ascii
Convert image url to ascii art
https://github.com/syzer/img2ascii
all-the-things ascii ascii-art converter gif giphy image-converter image-processing jpeg much-wow png
Last synced: 2 months ago
JSON representation
Convert image url to ascii art
- Host: GitHub
- URL: https://github.com/syzer/img2ascii
- Owner: syzer
- Created: 2016-01-25T20:31:22.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T22:29:04.000Z (about 2 years ago)
- Last Synced: 2024-10-13T00:13:27.274Z (3 months ago)
- Topics: all-the-things, ascii, ascii-art, converter, gif, giphy, image-converter, image-processing, jpeg, much-wow, png
- Language: JavaScript
- Homepage:
- Size: 382 KB
- Stars: 22
- Watchers: 5
- Forks: 3
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# img2ascii
[![Greenkeeper badge](https://badges.greenkeeper.io/syzer/img2ascii.svg)](https://greenkeeper.io/)
[![NPM Version](https://badge.fury.io/js/img2ascii.svg)](https://badge.fury.io/js/img2ascii)
[![Dependency Status](https://david-dm.org/syzer/img2ascii.svg)](https://david-dm.org/syzer/img2ascii)
[![Downloads Today](https://img.shields.io/npm/dt/img2ascii.svg)](https://badge.fury.io/js/img2ascii)
[![Downloads Month](https://img.shields.io/npm/dm/img2ascii.svg)](https://badge.fury.io/js/img2ascii)
[![Build Status](https://img.shields.io/travis/syzer/img2ascii.svg)](https://badge.fury.io/js/img2ascii)## Purpose
- Downloads images (jpeg/gif/png) and outputs them in your console.
- Make custom ssh login message for your users.
- Picture is worth thousands words.. we will use both!![Doge In terminal](https://raw.githubusercontent.com/syzer/img2ascii/master/doge.png)
## Getting Started
```sh
brew install graphicsmagick
npm install -g img2ascii
```## Usage CLI
```sh
Usage: img2ascii [url|file] --cols [num] --ratio [num]Options:
-c, --cols Number of columns in terminal [default: 80]
-r, --ratio Aspect ratio. Try 0.5 to flatten image
and 2 to lengthen image [default: 1]
```## Examples
```sh
img2ascii doge.png
img2ascii https://pbs.twimg.com/profile_images/378800000822867536/3f5a00acf72df93528b6bb7cd0a4fd0c.jpeg
img2ascii doge.png --cols 20 --ratio 0.5
```## Usage as module
```js
const img2ascii = require('img2ascii')({
img: './assets/snafu.gif',
cols: 90, // optional
ratio: 1.2 // optional
}).pipe(process.stdout)
```