I decided to use GD::SecurityImage::AC instead of coding a captcha handler. However, there was a problem, I think it is related to SecurityImage itself. I tried some TTF fonts and with many of them the letters were placed vertically outside of the captcha image or were only partially visible. I know that this is a matter of font size and that the issue could be compensated by enlarging the captcha size. I tried both but a smaller font size was very hard to read and enlarging the captcha really produced too big images. I would appreciate if there was an option to define the letter spacings or something like that. I tried to fix it myself, but since my Perl knowledge is very limited, I might have done something stupid(?) Nevertheless, it now seems to work.
Here my modification in GD.pm:
# push(@randomy, $_, - $_) foreach $sy*1.2,$sy, $sy/2, $sy/4, $sy/8;
push(@randomy, $_, - $_) foreach $sy/3,$sy/4, $sy/5, $sy/6, $sy/8; #modificated
BTW, I also added some more randomness to angles, particles and to circles/ellipses. I think it shouldn't be so fixed as currently done by SecurityImage, just for security reasons.
(to see modifications go to http://netticat.ath.cx ... Contact/Message)
One more question: What would I need to do to get letters slightly overlapping each other?