Zend_Captcha_Image adapter takes the generated word and
renders it as an image, performing various skewing permutations to make it
difficult to automatically decipher. It
requires the GD extension
compiled with TrueType or Freetype support. Currently, the
Zend_Captcha_Image adapter can only generate
Zend_Captcha_Word, and additionally exposes the
getExpiration()allow you to specify a maximum lifetime the CAPTCHA image may reside on the filesystem. This is typically a longer than the session lifetime. Garbage collection is run periodically each time the CAPTCHA object is invoked, deleting all images that have expired. Expiration values should be specified in seconds.
getGcFreg()allow you to specify how frequently garbage collection should run. Garbage collection will run every 1/$gcFreq calls. The default is 100.
getFont()allow you to specify the font you will use.
$fontshould be a fully qualified path to the font file. This value is required; the CAPTCHA will throw an exception during generation if the font file has not been specified.
getFontSize()allow you to specify the font size in pixels for generating the CAPTCHA. The default is 24px.
getHeight()allow you to specify the height in pixels of the generated CAPTCHA image. The default is 50px.
getWidth()allow you to specify the width in pixels of the generated CAPTCHA image. The default is 200px.
getImgDir()allow you to specify the directory for storing CAPTCHA images. The default is "
./images/captcha/", relative to the bootstrap script.
getImgUrl()allow you to specify the relative path to a CAPTCHA image to use for HTML markup. The default is "
getSuffix()allow you to specify the filename suffix for the CAPTCHA image. The default is "
.png". Note: changing this value will not change the type of the generated image.
getDotNoiseLevel(), along with
getLineNoiseLevel(), allow you to control how much "noise" in the form of random dots and lines the image would contain. Each unit of
$levelproduces one random dot or line. The default is 100 dots and 5 lines. The noise is added twice - before and after the image distortion transformation.
All of the above options may be passed to the constructor by simply removing the 'set' method prefix and casting the initial letter to lowercase: "suffix", "height", "imgUrl", etc.