42 Astoundingly Useful Scripts and Automations for the Macintosh

The seventies like a shooting star

When creating ASCII art with the asciiArt script, you can maintain the color of an overlay even in areas where the photo is white, by using a block character instead of a space for the final character in the palette.

Jerry Stratton, August 4, 2019

Author in seventies space: Shooting stars and a rainbow overlayed over author ASCII image.; Jerry Stratton; ascii art

This would have looked perfectly normal in the seventies. “The past is another country,” wrote Mark Steyn in Passing Parade, “but the Seventies is another planet.”

I have no idea what to think about this image. I found this very seventies cartoon art of stars and rainbows and had to turn it into ASCII art, and I did it by (a) overlaying it on a photo of myself (the same photo that went on the cover of 42 Astounding Scripts and which I also used for the pointillism example inside the book) and (b) using the large block from the UTF-8 character set: █ as the background character. By using the block instead of a space, the background takes on the color of the overlay; normally, the overlay disappears in places there is no photo underneath it.

Because the block character doesn’t reach all the way to the top and bottom of the line, it creates a weird windowshade effect.

Assuming you have a photo of yourself called “photo.jpg” and you’ve named the stars and rainbow “stars.png”, this is the command line script that will create the very strange seventies-style ASCII-ish art:

  • asciiArt photo.jpg --width 240 --quiet --save myspace.png --overlay stars.png --palette "@%#*=+:-.█" --bgcolor .8,.8,.5

Another interesting effect can be gotten by replacing the block character with, say, a question mark, or a zero.

If you want to experiment with non-ASCII characters in your ASCII art, the Terminal has access to characters you can’t type. Use the Edit menu, and Emoji and Symbols.

I normally avoid using non-ASCII characters with the asciiArt script. Non-ASCII characters often causes problems, because some of the non-ASCII characters are not a uniform width even in monospace fonts. This will cause distortion, sometimes severe, in the final image. Sadly, for example, emoji won’t work for ASCII art because of this. Which means that an ASCII image using nothing but smiley faces remains an impossible dream.

The normal form of ASCII art creation also does not work well on cartoony images such as the star-and-rainbow image I used as an overlay here. ASCII art requires photo-realistic images with lots of gradation of color to trigger varying characters. They can, on the other hand, work well with a sequential palette, where the image is created using some text that is meant to be read. Such as, perhaps, a quote from 2001: A Space Odyssey:

  • asciiArt stars.png --palette "my god it's full of stars. " --sequence elide .99 --colors --save starfull.png

It is, of course, pretty much the opposite of Kubrick’s vision for the movie.

It’s full of stars: Let’s completely bastardize 2001’s iconography.; ascii art; 2001: A Space Odyssey

Sorry, Stan.

  1. Patriot Day ->