Class

Captcha

Captcha(widthopt, heightopt, charactersopt)

Captcha Generator

Constructor

# new Captcha(widthopt, heightopt, charactersopt)

Start captcha image creation.

Parameters:
Name Type Attributes Description
width number <optional>

Width of captcha image.

height number <optional>

Height of captcha image.

characters number <optional>

Size of captcha text.

View Source captcha.js, line 10

Members

# png

Get png image of captcha.

View Source captcha.js, line 45

# text

Get Captcha text.

View Source captcha.js, line 38

Methods

# addDecoy(decoyOptionopt) → {Captcha}

Add decoy on your captcha image.

Parameters:
Name Type Attributes Description
decoyOption SetDecoyOptions <optional>

Decoy option you want to customise

View Source captcha.js, line 63

Captcha

# drawCaptcha(captchaOptionopt) → {Captcha}

Draw captcha text on captcha image.

Parameters:
Name Type Attributes Description
captchaOption DrawCaptchaOption <optional>

View Source captcha.js, line 104

Captcha

# drawImage(image) → {Captcha}

Draw image on your captcha.

Parameters:
Name Type Description
image Image

Choose image you want to add.

View Source captcha.js, line 54

Captcha

# drawTrace(traceOptionopt) → {Captcha}

Draw trace line over your captcha.

Note: If you want to use custom text or change size of captcha text then drawCaptcha before drawTrace.

Parameters:
Name Type Attributes Description
traceOption SetTraceOptions <optional>

View Source captcha.js, line 83

Captcha