diff --git a/springboot-web/src/main/java/com/tiesheng/web/pojos/dto/ImageCodeDTO.java b/springboot-web/src/main/java/com/tiesheng/web/pojos/dto/ImageCodeDTO.java index eb6558e..6d719ba 100644 --- a/springboot-web/src/main/java/com/tiesheng/web/pojos/dto/ImageCodeDTO.java +++ b/springboot-web/src/main/java/com/tiesheng/web/pojos/dto/ImageCodeDTO.java @@ -26,6 +26,10 @@ public class ImageCodeDTO { if (height == null) { height = 62; } + + width = Math.min(width, 500); + height = Math.min(height, 200); + LineCaptcha lineCaptcha = CaptchaUtil.createLineCaptcha(width, height, 4, lineCount); lineCaptcha.setGenerator(new RandomGenerator("0123456789", 4));