Text as Image

Presenting my new^ web toy: Text as Image Web Service Hack

Let's start with this URL:
http://antrix.net/text/?text=hello world

That returns an image:
Hello World

It's too dull, I think.
http://antrix.net/text/?text=hello world&fgcolor=white
Hello World

Or maybe the same color as the titles on this blog.
http://antrix.net/text/?text=hello world&fgcolor=A4C130
Hello World

How about swapping the colors?!
http://antrix.net/text/?text=hello world&fgcolor=160B35&bgcolor=A4C130
Hello World

Or simply:
http://antrix.net/text/?text=hello world&fgcolor=transparent&bgcolor=A4C130
Hello World

Back to basics, but a less boring font:
http://antrix.net/text/?text=hello world&font=georgia
Hello World

A bigger size really brings out the serifs!
http://antrix.net/text/?text=hello world&font=georgia&size=48
Hello World

But perhaps you have a taste for the tiny?
http://antrix.net/text/?text=hello world&font=silk&size=8&fgcolor=teal
Hello World

Oops!! The font is called Silkscreen!
http://antrix.net/text/?text=hello world&font=silkscreen&size=8&fgcolor=teal
Hello World

And just so you don't make a mistake like that with all those options, there's a nice Web 1.0 form to help you out!

Have fun!

PS: This is yet another web.py hack of mine.


^ Not exactly new since I wrote this couple of weeks ago. I didn't release it then since there was a font rendering bug in PIL which got fixed recently!

Comments

http://aaugh.com/imageabuse.html

Yeah, that's a great hack. I've been using it for some time now to quickly get book covers for my blog's 'Now Reading' section :-)

I love services which use the URL itself as an API. That's one reason I stick with del.icio.us although the competition offers more features.

The program outputs 'ca~A+-' (I don't have these in my keyboard) when I input 'caña'. I guess the string should be encoded in iso-8859-1 instead of utf-8 before being fed to the graphics generator.

Sorry, I didn't test for any encoding related issues!

Will do as soon as I get some time.


Markdown formatting supported