Captcha.setBackground为null时背景透明

This commit is contained in:
Looly
2024-04-24 14:46:09 +08:00
parent c0807bfa49
commit 73e8c67d0b
7 changed files with 13 additions and 13 deletions

View File

@@ -28,8 +28,8 @@ public class CaptchaTest {
public void lineCaptchaTest3() {
// 定义图形验证码的长和宽
LineCaptcha lineCaptcha = CaptchaUtil.createLineCaptcha(200, 70, 4, 15);
lineCaptcha.setBackground(Color.yellow);
lineCaptcha.write("f:/test/captcha/tellow.png");
lineCaptcha.setBackground(null);
lineCaptcha.write("d:/test/captcha/tellow.png");
}
@Test