home configuration implementation extending download about


extend:

background
text
distortion
rendering



Creating your own background producer.

The background producer produces (you could have guessed) the background for the captcha. The default is a class called DefaultBackgroundImp.

Extending it can be done by either implementing the BackGroundProducer interface or by subclassing the DefaultBackgourndImp. When sub classing there is one method to override:  

public BufferedImage addBackground(BufferedImage image) 

where the basic idea is to create a new image with the same aspect ratio as the original. First draw the background on it and then the original picture.




 

 

 

SourceForge Logo