module for generating captcha images

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


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
and see some images it made here:

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 :)



More information about the Python-list mailing list