Class | CAPTCHA::ObfuscatedImage |
In: |
lib/captcha.rb
|
Parent: | GD::Image |
An obfuscated image, which draws the letters of a key string at random offsets against a noisy background.
this is the only way to create an image of this sort, since ‘new’ is private. This is because of the way the Ruby/GD module implements the GD::Image class… you can‘t override it by providing an ‘initialize’ method.
The ‘initialize’ method for an ObfuscatedImage. The parameters are the same as for the create method, with the addition of char_height (which represents the maximum height of any character in the string).