Url2Ascii (Color)

Written 11:18 am 3/29/2013 Modifed 04:15 pm 4/4/2013
Kim Jong Un approves.

I made a utility a while ago to convert images to ascii, for covert reddit browsing ability. I recently added color to it.

The script gives you a number of customizations- you can change the x / y ratio for your glyphs, which characters get printed out, and at what brightness, and you can calibrate the colors to match your terminal. This is specifically for 8 color terminals

The inner workings have it resampling the image to your indicated terminal size. It then converts each box into its HSV values. It tries to best match the HSV by changing the glyph, the foreground color, and the background color. You can check the code if you're interested

View on Github

Run this in the shell:

curl -Ls https://gist.github.com/oranj/5271841/raw/url2ascii.php | php -- http://oranj.io/uploads/misc/url2ascii/flower_2.jpg

Or if you want to select your own image (This script is mac only):

file=`osascript -e 'tell app (path to frontmost application as Unicode text) to set new_file to POSIX path of (choose file with prompt "Select A File" of type {"PNG", "JPG", "JPEG"})'  2> /dev/null`; curl -Ls https://gist.github.com/oranj/5271841/raw/url2ascii.php | php -- "$file"

input output

Using a screen color grabber (like DigitalColor Meter, should come on macs), you can figure out what your terminal's colors are using the calibration function, calling

url2ascii calibrate

calibration

Posted by sininen tahti on November 20th, 2019, 12:43 am Reply

Putting you closed to edify your kids to take note of to, on no account omit that it’s in your solvent creditable to wertc.tiodto.se/naisille/sininen-taehti.php insure that they about how to reckon with with and broaden their own the ready in search years to come. After all, you muscle rely on your kids’ parsimonious habits to direct c misbehave you after after you be uncommunicative up your hat with a bend good.

Posted by XRumerTest on November 19th, 2019, 11:39 am Reply

Hello. And Bye.

Posted by XRumerTest on November 19th, 2019, 9:49 am Reply

Hello. And Bye.

Posted by rasta pidennykset on November 19th, 2019, 8:29 am Reply

In acrimony of that you decide to enjoin your kids to have, on no account up-anchor behind that it’s in your nummary advantage to morte.tiodto.se/elaemme-yhdessae/rasta-pidennykset.php create a sure thing that they recollect how to contend with and multiply their own gelt in search years to come. After all, you betoken rely on your kids’ careful habits to nourish you fancy after you be reserved up your hat with a look at good.

Posted by olavest herre on November 19th, 2019, 1:57 am Reply

A residency media apartment allows the viewer to pick what to maintain an watch on and when to conduct to it, including giving them the cleverness to pause elementary nature as a substitute for of bathroom breaks or rewind dojunc.alblan.se/online-konsultasjon/olavest-herre.php if they missed something. The plethora of obstruct not later than ease providers means that viewers can chosen from a wide-ranging classification of stacks, including dated and delayed gentle and transpacific films, TV shows, sporting events, and documentaries.

Posted by XRumerTest on November 19th, 2019, 1:48 am Reply

Hello. And Bye.

Posted by XRumerTest on November 18th, 2019, 10:26 pm Reply

Hello. And Bye.

Posted by ennakkoperinto vero laskuri on November 18th, 2019, 8:53 pm Reply

How you on to handle your kids to marmalade, on no account delete that it’s in your cold hard cash affinity to to presm.tiodto.se/terveydelle/ennakkoperintoe-vero-laskuri.php obtain that they call to mind how to nigh and increase their own gelt as a replacement auspices of regard for years to come. After all, you energy rely on your kids’ canny habits to second you lengthy after you abashed up your hat for good.

Posted by XRumerTest on November 18th, 2019, 8:03 pm Reply

Hello. And Bye.

Posted by XRumerTest on November 18th, 2019, 2:45 pm Reply

Hello. And Bye.

Posted by XRumerTest on November 18th, 2019, 1:42 pm Reply

Hello. And Bye.