public class LineCaptcha extends AbstractCaptcha
background, code, font, generator, height, imageBytes, interfereCount, textAlpha, width| Constructor and Description |
|---|
LineCaptcha(int width,
int height)
构造,默认5位验证码,150条干扰线
|
LineCaptcha(int width,
int height,
CodeGenerator generator,
int interfereCount)
构造
|
LineCaptcha(int width,
int height,
int codeCount,
int lineCount)
构造
|
LineCaptcha(int width,
int height,
int codeCount,
int interfereCount,
float sizeBaseHeight)
构造
|
| Modifier and Type | Method and Description |
|---|---|
Image |
createImage(String code)
根据生成的code创建验证码图片
|
createCode, generateCode, getCode, getGenerator, getImage, getImageBase64, getImageBase64Data, getImageBytes, setBackground, setFont, setGenerator, setTextAlpha, verify, write, write, writepublic LineCaptcha(int width,
int height)
width - 图片宽height - 图片高public LineCaptcha(int width,
int height,
int codeCount,
int lineCount)
width - 图片宽height - 图片高codeCount - 字符个数lineCount - 干扰线条数public LineCaptcha(int width,
int height,
CodeGenerator generator,
int interfereCount)
width - 图片宽height - 图片高generator - 验证码生成器interfereCount - 验证码干扰元素个数public LineCaptcha(int width,
int height,
int codeCount,
int interfereCount,
float sizeBaseHeight)
width - 图片宽height - 图片高codeCount - 字符个数interfereCount - 验证码干扰元素个数sizeBaseHeight - 字体的大小 高度的倍数public Image createImage(String code)
AbstractCaptchacreateImage in class AbstractCaptchacode - 验证码Copyright © 2025. All rights reserved.