module for generating captcha images

Irmen de Jong irmen.NOSPAM at xs4all.nl
Sun Aug 3 19:19:20 CEST 2008


Hi,

I wanted to generate Captcha images(*) from Python and I couldn't find any module that 
suited my needs so I made one myself.

It only needs PIL. (I used PIL 1.1.6)

It can generate images with a provided background or it can make a random background for 
you. It needs a truetype font to draw the letters, and outputs jpeg images.

You can download the module from http://www.razorvine.net/download/captcha.py
and see some images it made here: http://www.razorvine.net/download/captcha-examples/

I'm planning to improve it a bit still, I don't like the random noise lines.
It should probably draw an angled line such as you see in the wikipedia article.

Hope it's useful for anyone beside myself :)


--irmen


(*) http://en.wikipedia.org/wiki/Captcha



More information about the Python-list mailing list