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 size)
构造
|
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, write
public 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 size)
width
- 图片宽height
- 图片高codeCount
- 字符个数interfereCount
- 验证码干扰元素个数size
- 字体的大小 高度的倍数public Image createImage(String code)
AbstractCaptcha
createImage
in class AbstractCaptcha
code
- 验证码Copyright © 2024. All rights reserved.