Captcha.setBackground为null时背景透明

This commit is contained in:
Looly 2024-04-24 14:49:56 +08:00
parent 1b4fb6d8e4
commit 060296167b

View File

@ -44,6 +44,15 @@ public class CaptchaTest {
lineCaptcha.write("f:/test/captcha/tellow.png"); lineCaptcha.write("f:/test/captcha/tellow.png");
} }
@Test
@Disabled
public void noBackgroundCaptchaTest() {
// 定义图形验证码的长和宽
final LineCaptcha lineCaptcha = CaptchaUtil.ofLineCaptcha(200, 70, 4, 15);
lineCaptcha.setBackground(null);
lineCaptcha.write("d:/test/captcha/tellow.png");
}
@Test @Test
@Disabled @Disabled
public void lineCaptchaWithMathTest() { public void lineCaptchaWithMathTest() {