有用Captcha做出来只有一条干扰线的验证码吗????、急 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 哎,没有用过Captcha有很多md5的验证码很好用的 没有用过captcha,有java做的很好实现 没有用过captcha,有jsp做的很好实现 */public class TkGameCaptchaEngine extends ListImageCaptchaEngine { protected void buildInitialFactories() { com.octo.captcha.component.word.wordgenerator.WordGenerator wordGenerator = (new RandomWordGenerator( "0123456789")); //nteger minAcceptedWordLength, Integer maxAcceptedWordLength,Color[] textColors com.octo.captcha.component.image.textpaster.TextPaster textPaster = new RandomTextPaster( 4, 4, Color.BLUE); //Integer width, Integer height com.octo.captcha.component.image.backgroundgenerator.BackgroundGenerator backgroundGenerator = new GradientBackgroundGenerator( 90, 39, Color.lightGray, Color.white); //Integer minFontSize, Integer maxFontSize com.octo.captcha.component.image.fontgenerator.FontGenerator fontGenerator = new TwistedAndShearedRandomFontGenerator( 21, 21); com.octo.captcha.component.image.wordtoimage.WordToImage wordToImage = new ComposedWordToImage( fontGenerator, backgroundGenerator, textPaster); addFactory(new GimpyFactory(wordGenerator, wordToImage)); }}-------------------------------------------------------------------------------------这个就是生成验证码的代码,但是是没有一条干扰线的,我想要有一条干扰线的 验证码 ,修改这里的代码费了老尽了 ,弄不出来 希望会的大侠帮帮忙 。。 不太懂captcha,不过可以试试,在你那张 backgroundGenerator 上面选取两点 然后画出条line来。不敢保证,给楼主提供个思路。 小菜求教,经纬度求距离相关的问题,设计到数据库。。。 js代码解释下 为甚麽我的web.xml的welcome-file没有用呢 spring连接池报错 高手来~~ tomcat5.5的性能怎么样?还有什么好的推荐一下? ITGirl群12304042,欢迎各位MM加入哦~~ Tomcat运行一段时间后,出现OutOfMemoryError,请问如何解决? Eclipse3.0RC1有没有可以用的JSP插件啊? 关于stuts2修改后加载列表的问题 struts2中参数传递 java开发的系统慢,怀疑是Connection流没有关闭
哎,没有用过Captcha有很多md5的验证码很好用的
public class TkGameCaptchaEngine extends ListImageCaptchaEngine {
protected void buildInitialFactories() {
com.octo.captcha.component.word.wordgenerator.WordGenerator wordGenerator = (new RandomWordGenerator(
"0123456789"));
//nteger minAcceptedWordLength, Integer maxAcceptedWordLength,Color[] textColors
com.octo.captcha.component.image.textpaster.TextPaster textPaster = new RandomTextPaster(
4, 4, Color.BLUE);
//Integer width, Integer height
com.octo.captcha.component.image.backgroundgenerator.BackgroundGenerator backgroundGenerator = new GradientBackgroundGenerator(
90, 39, Color.lightGray, Color.white);
//Integer minFontSize, Integer maxFontSize
com.octo.captcha.component.image.fontgenerator.FontGenerator fontGenerator = new TwistedAndShearedRandomFontGenerator(
21, 21);
com.octo.captcha.component.image.wordtoimage.WordToImage wordToImage = new ComposedWordToImage(
fontGenerator, backgroundGenerator, textPaster);
addFactory(new GimpyFactory(wordGenerator, wordToImage));
}
}-------------------------------------------------------------------------------------
这个就是生成验证码的代码,但是是没有一条干扰线的,我想要有一条干扰线的 验证码 ,修改这里的代码费了老尽了 ,弄不出来 希望会的大侠帮帮忙 。。
不敢保证,给楼主提供个思路。