ImageCaptcha()

Creates a captcha image

Requires Extension: Image extension

ImageCaptcha( text=string, height=numeric, width=numeric, difficulty=string, fonts=any, fontsize=numeric, fontcolor=string );

Returns: any

Argument Description Default
text
string, required

Text in the captcha.

height
numeric, required

Height of the captcha.

width
numeric, required

Width of the captcha.

difficulty
string, optional

Level of complexity of the CAPTCHA text.

Specify one of the following levels of text distortion: low, medium, high

low

fonts
any, optional

One or more valid fonts to use for the CAPTCHA text, as an array or as string list (separate multiple fonts with commas). Lucee supports only the system fonts that the JDK can recognize. For example, TTF fonts in the Windows directory are supported on Windows.

Alias: font

arial

fontsize
numeric, optional

font size of the text in the CAPTCHA image.

Alias: size

24

fontcolor
string, optional

font color of the text in the CAPTCHA image.

Alias: color

black

Examples

imagewritetobrowser(imagecaptcha( "abcdec", 100, 300, "low"));
	imagewritetobrowser(imagecaptcha( "abcdec", 100, 300, "medium"));
	imagewritetobrowser(imagecaptcha( "abcdec", 100, 300, "high"));

See also