优化验证码效果

pull/7/head
synchronized 6 years ago
parent a20a239db8
commit 7defc7e727

@ -32,17 +32,17 @@ public class CaptchaTest {
@Test @Test
public void testHan() throws Exception { public void testHan() throws Exception {
ChineseCaptcha chineseCaptcha = new ChineseCaptcha(); // ChineseCaptcha chineseCaptcha = new ChineseCaptcha();
//chineseCaptcha.setFont(new Font("微软雅黑", Font.PLAIN, 25)); //chineseCaptcha.setFont(new Font("微软雅黑", Font.PLAIN, 25));
System.out.println(chineseCaptcha.text()); // System.out.println(chineseCaptcha.text());
//chineseCaptcha.out(new FileOutputStream(new File("D:/Java/aa.png"))); //chineseCaptcha.out(new FileOutputStream(new File("D:/Java/aa.png")));
} }
@Test @Test
public void testGifHan() throws Exception { public void testGifHan() throws Exception {
ChineseGifCaptcha chineseGifCaptcha = new ChineseGifCaptcha(); // ChineseGifCaptcha chineseGifCaptcha = new ChineseGifCaptcha();
//chineseGifCaptcha.setFont(new Font("微软雅黑", Font.PLAIN, 30)); //chineseGifCaptcha.setFont(new Font("微软雅黑", Font.PLAIN, 30));
System.out.println(chineseGifCaptcha.text()); // System.out.println(chineseGifCaptcha.text());
//chineseGifCaptcha.out(new FileOutputStream(new File("D:/Java/aa.gif"))); //chineseGifCaptcha.out(new FileOutputStream(new File("D:/Java/aa.gif")));
} }

Loading…
Cancel
Save