Author: xor
Date: 2008-11-14 01:23:50 +0000 (Fri, 14 Nov 2008)
New Revision: 23558
Modified:
trunk/plugins/WoT/introduction/captcha/CaptchaFactory1.java
Log:
Fix usage of DefaultKaptcha.
Modified: trunk/plugins/WoT/introduction/captcha/CaptchaFactory1.java
===================================================================
--- trunk/plugins/WoT/introduction/captcha/CaptchaFactory1.java 2008-11-14
01:23:37 UTC (rev 23557)
+++ trunk/plugins/WoT/introduction/captcha/CaptchaFactory1.java 2008-11-14
01:23:50 UTC (rev 23558)
@@ -9,6 +9,7 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Date;
+import java.util.Properties;
import javax.imageio.ImageIO;
@@ -18,6 +19,7 @@
import plugins.WoT.introduction.IntroductionPuzzle;
import plugins.WoT.introduction.IntroductionPuzzleFactory;
import plugins.WoT.introduction.captcha.kaptcha.impl.DefaultKaptcha;
+import plugins.WoT.introduction.captcha.kaptcha.util.Config;
/**
* First implementation of a captcha factory.
@@ -36,6 +38,7 @@
ByteArrayOutputStream out = new ByteArrayOutputStream(10 *
1024);
try {
DefaultKaptcha captcha = new DefaultKaptcha();
+ captcha.setConfig(new Config(new Properties()));
String text = captcha.createText();
BufferedImage img = captcha.createImage(text);
/* TODO: find out the maximum size of the captchas and
put it here */
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs