Quick way to make a text only banner image



Linux.com has a great writeup on making banner images quickly and easily from the command line (or a script). The catch here is that text is the content for the image. Under linux that will require the following programs…. enscript and convert. Of course since this can be done from the command line, it can be scripted which might make an easy way to display email addresses without allowing address harvesting among other things… Anyway, here’s a summary…


echo "Headlines for `date +'%B %e'`" | enscript -o - -B -f "Times-Bold48" | convert -crop 0x0 - headlines.png

Here, they’ve used echo to send the current date to enscript…. enscript creates a postscript file of the text using the Times-Bold font at 48 point(to standard out) and then convert reads the ps file and crops it neatly around the text and dumps it to the headlines.png file.

They note that you can play around with options to convert to get other colors than black and white -negate for instance gives you a white text on black background and they also give some ideas for colored borders.

By the way, for a list of possible fonts you can look in /usr/share/enscript/afm/font.map

Nice tutorial.

   Send article as PDF   

Similar Posts