优化验证码的效果和干扰

This commit is contained in:
synchronized
2018-07-27 15:11:34 +08:00
parent a548f7af0b
commit 67409112a7
8 changed files with 204 additions and 128 deletions

View File

@@ -13,14 +13,14 @@ public class CaptchaTest {
@Test
public void test() throws Exception {
SpecCaptcha specCaptcha = new SpecCaptcha(150, 40, 4);
SpecCaptcha specCaptcha = new SpecCaptcha();
System.out.println(specCaptcha.text());
specCaptcha.out(new FileOutputStream(new File("D:/a/aa.png")));
}
@Test
public void testGIf() throws Exception {
GifCaptcha specCaptcha = new GifCaptcha(150, 40, 4);
GifCaptcha specCaptcha = new GifCaptcha(130, 48, 5);
System.out.println(specCaptcha.text());
specCaptcha.out(new FileOutputStream(new File("D:/a/aa.gif")));
}