cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <>
Subject Re: Warped Text...
Date Fri, 02 Sep 2005 15:55:32 GMT
On 2 Sep 2005, at 16:44, Sylvain Wallez wrote:
> Pier Fumagalli wrote:
>>> Did you look at what Ugo did with captchas?
>>> Ciao,
>> Yep, but SVG IMVHO is quite overkill to generate a simple  
>> image...  Plus I suspect that the blurring algorithm is quite easy  
>> to recognize  (in terms of running a simple image analysis package  
>> over the  generated output).
> Just curious: what do you use to produce the image?

AWT... I create an image, dump some text into it, calculate a couple  
of sine-waves, use them as the displacement base, re-scale the warped  
image while antialiasing it... On my laptop, with Eclipse/iTunes/ 
blablalba and so on running, I can get something like 4 requests/ 
second (9 kilobytes/second) on 100x50 pixel images.

It can be optimized a lot, I'm sure about it, I waste quite a large  
amount of cylcles, but the code is so simple (100 lines with  
comments) that in a couple of iterations I'm pretty sure I can double  
the thrugput.

> If it's lighter and more efficient that SVG, we may simply consider  
> using your stuff for the captcha widget.

Pretty sure it's lighter than SVG (even in its current state)! :-D  
I'm all up for it, as long as it can be found also without CFORMs  
enabled (I don't normally include them but I need the reader) and as  
long as I don't have to integrate it (as I wouldn't know where to  

Shall I commit it in a simple block with a couple of samples, just to  
show how it works???


View raw message