
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Draw image into terminal ,whithout node-canvas.Let your command-line terminal not only have characters
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.
windows
npm install imaging -g
Mac/Linux
sudo npm install imaging -g
Node.js Module
npm install imaging --save
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:
imaging example.png -c square
equal imaging example.png -c ▇
var imaging = require('imaging');
imaging.draw('example.jpg', function (resp, status) {
/*
if status == 'success', resp is the image charater string.
conols.log(resp) to render the image in your terminal
else if if status == 'fail', resp is the error message
*/
console.log(status);
console.log(resp);
});
// limit the width for rendering
imaging.draw('example.jpg', { width: 50}, function (resp, status) {
/*
if status == 'success', resp is the image charater string.
conols.log(resp) to render the image in your terminal
else if if status == 'fail', resp is the error message
*/
(status == 'success') && console.log(resp);
});
imaging.draw(path, [options], callback) //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 imagecallback: function (resp, status)
status == "fail"
- resp: error msgstatus == "success"
- resp:imaging string in color formatSource image:
Draw into terminal:
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.
FAQs
Draw image into terminal ,whithout node-canvas.Let your command-line terminal not only have characters
We found that imaging demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.