Java验证码库 iCaptcha
jopen
13年前
<p>iCaptcha 是一个 Java 的验证码库,支持国际化和可定制。</p> <p><img alt="Java验证码库 iCaptcha" src="https://simg.open-open.com/show/0cc4b0a71e3d7667b911c4cff1c610bb.jpg" width="200" height="60" /></p> <p>示例代码:</p> <pre class="brush:java; toolbar: true; auto-links: false;">//Optional Properties Properties props = new Properties(); props.put("format", "jpg"); props.put("font", "Helvetica"); props.put("fontsize", "28"); props.put("min-width", "180"); props.put("padding-x", "25"); props.put("padding-y", "25"); OutputStream os = new FileOutputStream("c:/captcha/text.jpg"); FactoryLanguageImpl inst=(FactoryLanguageImpl)Producer.forName("org.smx.captcha.impl.FactoryLanguageImpl"); inst.setLanguageDirectory("C:/captcha/lang"); inst.setLanguage("RU"); inst.setRange(5, 10); //Select words between 5-10 letters Producer.render(os, inst, props);</pre> <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1324535038952" target="_blank">http://www.open-open.com/lib/view/home/1324535038952</a></p> <p></p>