convert (originalfile) -resize ##% (outputfile)
will resize an image by the percentage given. Better than using -scale
as it keeps the image quality up. Replace ##%
with HxW
to make the image resize into dimensions that best fit H
or W
. eg, a 1024x768 original ran through -resize 80x80
will have width of 80 and height within ratio.
Converting from one imgage type to the next is simple as well. convert png myjpeg.jpg
will convert myjpeg.jpg
into a png.
Using jp2a
as a neat tool to output images via ascii and ansi color codes into the terminal is fun and entertaining, but fleeting.
If I want to save the output for future use and display, I have two options. The first outputs html via jp2a
. jp2a --zoom-term --colors --html (originalfile) > newfile.html
will put the HTML output from jp2a into an html file. If, instead, I want to save the ansi codes and ascii decorations without formatting into html, I can simply pipe the output of the command jp2a ---colors --zoom-term (originalfile) > newfile.txt
and be done.