Provides information about the time when the current application scope was created.

imageCaptcha() → returns any

This function requires Lucee 5 and up.  Not supported on Adobe ColdFusion, etc.

Argument Reference

text string

Text in the image captcha.

height numeric

Height of the image in pixels.

width numeric

Width of the image in pixels.

difficulty string
Default: low

Complexity of the image.
  • low
  • medium
  • high

fonts any
Default: arial

One or more fonts for the CAPTCHA text, as an array or as string list (separated by commas). Lucee supports the system fonts recognized by JDK only.

fontsize numeric
Default: 24

Font size for text of the image.

fontcolor string
Default: black

Font color for text of the image.

Sample code invoking the imageCaptcha function

A 300px by 100px image captcha at medium difficulty.

imagewritetobrowser(imagecaptcha( 'abcxyz', 100, 300, 'medium'));

Expected Result: An 300px by 100px image captcha with the letters 'abcxyz'

Fork me on GitHub