fix:图像验证码的大小不能超过500x200
This commit is contained in:
@@ -26,6 +26,10 @@ public class ImageCodeDTO {
|
|||||||
if (height == null) {
|
if (height == null) {
|
||||||
height = 62;
|
height = 62;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
width = Math.min(width, 500);
|
||||||
|
height = Math.min(height, 200);
|
||||||
|
|
||||||
LineCaptcha lineCaptcha = CaptchaUtil.createLineCaptcha(width, height, 4, lineCount);
|
LineCaptcha lineCaptcha = CaptchaUtil.createLineCaptcha(width, height, 4, lineCount);
|
||||||
lineCaptcha.setGenerator(new RandomGenerator("0123456789", 4));
|
lineCaptcha.setGenerator(new RandomGenerator("0123456789", 4));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user