Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aantthony/console-png
Print PNG images to terminal output
https://github.com/aantthony/console-png
Last synced: 6 days ago
JSON representation
Print PNG images to terminal output
- Host: GitHub
- URL: https://github.com/aantthony/console-png
- Owner: aantthony
- License: mit
- Created: 2015-11-02T09:21:07.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-30T12:56:55.000Z (over 7 years ago)
- Last Synced: 2024-09-23T16:17:44.365Z (about 2 months ago)
- Language: JavaScript
- Size: 54.7 KB
- Stars: 86
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nodejs - console-png - Print PNG images to terminal output. (Repository / Command-line Utilities)
README
# console-png
[![NPM Version](https://img.shields.io/npm/v/console-png.svg)](https://www.npmjs.com/package/console-png)
[![Build Status](https://img.shields.io/travis/aantthony/console-png/master.svg)](https://travis-ci.org/aantthony/console-png)Print PNG images to terminal output.
## Install
To use this on your terminal:
```
npm install -g console-png
```To use this programatically:
```
npm install --save console-png
```## Terminal Usage
```
> console-png
Usage: console-png [PNG FILE]...
> console-png apple.png
{image shown here}
```## Example Usage
```js
require('console-png').attachTo(console);var image = require('fs').readFileSync(__dirname + '/nodejs-green.png');
console.png(image);
```![Screenshot](/demo/screenshot.png)
## Alternate Usage
```js
var pngStringify = require('console-png');var image = require('fs').readFileSync(__dirname + '/nodejs-green.png');
pngStringify(image, function (err, string) {
if (err) throw err;
console.log(string);
})
```