Package | Description |
---|---|
cn.hutool.captcha |
图片验证码实现
|
Modifier and Type | Method and Description |
---|---|
static GifCaptcha |
CaptchaUtil.createGifCaptcha(int width,
int height)
创建GIF验证码
|
static GifCaptcha |
CaptchaUtil.createGifCaptcha(int width,
int height,
CodeGenerator generator,
int thickness)
创建GIF验证码
|
static GifCaptcha |
CaptchaUtil.createGifCaptcha(int width,
int height,
int codeCount)
创建GIF验证码
|
static GifCaptcha |
CaptchaUtil.createGifCaptcha(int width,
int height,
int codeCount,
int thickness,
float size)
创建圆圈干扰的验证码
|
GifCaptcha |
GifCaptcha.setMaxColor(int maxColor)
设置验证码字符颜色
|
GifCaptcha |
GifCaptcha.setMinColor(int minColor)
设置验证码字符颜色
|
GifCaptcha |
GifCaptcha.setQuality(int quality)
设置图像的颜色量化(转换质量 由GIF规范允许的最大256种颜色)。
低的值(最小值= 1)产生更好的颜色,但处理显著缓慢。
10是默认,并产生良好的颜色而且有以合理的速度。
值更大(大于20)不产生显著的改善速度
|
GifCaptcha |
GifCaptcha.setRepeat(int repeat)
设置GIF帧应该播放的次数。
默认是 0; 0意味着无限循环。
必须在添加的第一个图像之前被调用。
|
Copyright © 2024. All rights reserved.