[Repost] How to view pictures under the command line, "Command Line Picture Viewer"

How to view pictures on the command line, "Command Line Picture Viewer"
original xerysherryx Last post on 2018-01-16 15:20:25 reading number 13916 collection
launched
in the case of the various attributes of command, from the command line is convenient. However, if you encounter pictures, if the picture naming is very confusing, it is very troublesome to determine what the picture is. I wonder if you solve it.

Here I recommend an interesting library, you can view the pictures on the command line (but do n’t have any illusions about the clarity of the picture, just see the pictures)

 

how to install?

npm install cishower -g

 


how to use?

cishower <file/url>

 



Command line parameter description:

- W: the width of the display image, the default is 80 
 - H: height of the image is displayed, automatically match the height is 0, the default is 0 
 - G: whether the gradation display image 
 -bg: set the background color, if the picture is transparent passage Meaningful, [white | black | 000000 ~ ffffff] 
 -m: set the aspect ratio, the default is 2: 1 , after setting it is 1: 1  
-v: whether to display the picture information

The execution statement is:

Example: cishower filepath -w 80 -g- v 
Example: cishower url -m -bg 0000ff

 

How is the code used?
Reference it, then call it like this:

import { shower } from "cishower";

shower("https://www.linuxfoundation.org/wp-content/uploads/2017/05/nodejs_logo.png",
80, undefined, undefined, undefined, "white", undefined, [1,1]);

 

————————————————
Copyright Statement: This article is an original article of CSDN blogger “xerysherryx”, following the CC 4.0 BY-SA copyright agreement, please attach the original source link and this statement .
Original link: https://blog.csdn.net/xerysherryx/article/details/79075308

Guess you like

Origin www.cnblogs.com/jinanxiaolaohu/p/12606093.html