The ConfigurableRipple class allows you to define the
amplitude, wavelength and phase for your SimpleCaptcha
distorted images.
The first thing you must do is include the
com.lamatek.captcha.ConfigurableRipple class
in your WEB-INF/classes directory of your web
application. Once done, the file path should
look like:
%Context_Root%/WEB-
INF/classes/com/lamatek/captcha/ConfigurableRipple.clas
s
You specify use of the ConfigurableRipple by setting
it as the cap.obscurificator parameter:
<init-param>
<param-name>cap.obscurificator</param-name>
<param-
value>com.lamatek.captcha.ConfigurableRipple</param-
value>
</init-param>
Next you specify the amount of distortion by setting
three init-param entries.
The first is the filter.amplitude property. Here you
specify the amplitude (in pixels)
of the wave along which the text is distorted. Default
is 4.
<init-param>
<param-name>filter.amplitude</param-name>
<param-value>4</param-value>
</init-param>
The second is the filter.wavelength property. Here you
specify the wavelength (in pixels)
of the wave along which the text is distorted. Default
is 70.
<init-param>
<param-name>filter.wavelength</param-name>
<param-value>70</param-value>
</init-param>
The last is the filter.phase property. Here you
specify the phase (in pixels) of the wave along
which the text is distorted. Default is 15.
<init-param>
<param-name>filter.phase</param-name>
<param-value>15</param-value>
</init-param>
You can mess around with the various settings to get
something that better suits your taste.
That's about it. Hope you hav fun with it!
Tom Cole
tcole6@gmail.com
Includes binary, source and readme files.