An open API service indexing awesome lists of open source software.

https://github.com/sevinf/termimage

Node.js library for displaying images in terminal
https://github.com/sevinf/termimage

Last synced: over 1 year ago
JSON representation

Node.js library for displaying images in terminal

Awesome Lists containing this project

README

          

# Termimage

Library for displaying images in supported terminals:

* iTerm2 nightly builds
* TODO: Xterm with a help of w3m

## Usage

```javascript
var termimage = require('termimage');

// Show image from file
termimage.displayImage('/path/to/image');

// Show image from buffer
termimage.displayImage(buffer);

// Show scaled image.
termimage.displayImage(buffer, {
width: 100,
height: 100
});

// Aspect ratio will be preserved if
// only one dimension is specified
termimage.displayImage(buffer, {
width: 100
});

// Specify the name of the image
termimage.displayImage(buffer, {
name: 'my photo'
});

```