imaging
Drawing image in your terminal whithout node-canvas,and the outputing image is more clear than using picture-tube
.
Imaging, let your terminal outputs more interesting.
Installing
windows
npm install imaging -g
Mac/Linux
sudo npm install imaging -g
Node.js Module
npm install imaging --save
Usage
Command line:
imaging https://www.google.com.hk/images/srpr/logo11w.png
Using piping:
echo 'https://www.google.com.hk/images/srpr/logo11w.png' | imaging
options
Set image width
:
imaging example.png -w 20## or imaging example.png --width 20
Set offset left
:
imaging example.png -l 20## or imaging example.png --left 20
custom pixel char
:
imaging example.png -c @## or imaging example.png --char # ## if error or don't take effect, try wrapping the char with "" imaging example.png -c "*"
imaging char names:
- charmap specific color with specific char, enjoy it.
- square "▇"
- circle "●"
- rectangle" "█"
imaging example.png -c square
equal imaging example.png -c ▇
Nodejs module
var imaging = ;imaging; // limit the width for renderingimaging;
API
imaging //path could be a remote link or local resource
options: object
width
- the width of image for renderingleft
- set the left offset of imagechar
- set the char as pixel of rendered image
callback: function (resp, status)
status == "fail"
- resp: error msgstatus == "success"
- resp:imaging string in color format
Example
Source image:
Draw into terminal:
Support
Now, it dosn't support rendering images with batch processing. So when you want to render multiple images, only the way to imaging
image for each.