1.0.7 • Published 6 years ago

img-term-string v1.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

img-term-string Build Status

From image url or file to a string that can be used to render the image in the terminal.

npm.io Currently supported on iTerm2 >= 3.

Install

$ npm install --save img-term-string

Usage

const imgTermString = require('img-term-string');

imgTermString({ src: "https://someimage.png or path/to/local/image" })
    .then(imgString => { console.log(imgString) });
// returns the image string and logs it to the terminal

API

imgTermString(options)

Returns a the formatted image string via promise or callback.

src

Type: string

The url or file path of the image.

width

height

Type: string number Default: auto Options: Npx N% N auto

Optional arguments. Set the width and height of the image.

  • in pixels(Npx)
  • as a % of the terminal view(N%)
  • number of char cells(N)
  • autoscale based on the image dimensions(auto)

License

MIT

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago