# simplecaptcha
**Repository Path**: tavenli/simplecaptcha
## Basic Information
- **Project Name**: simplecaptcha
- **Description**: a simple captcha for apiclub
- **Primary Language**: Java
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2016-10-21
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: captcha
**Tags**: None
## README
# simplecaptcha
a simple captcha for apiclub
this simplecaptcha as well as SimpleCaptcha (http://simplecaptcha.sourceforge.net)
In Maven:
```xml
cn.apiclub.tool
simplecaptcha
1.2.2
```
How to use it ? For Example:
```java
List colors = new ArrayList();
colors.add(Color.GREEN);
colors.add(Color.BLUE);
List fonts = new ArrayList();
fonts.add(new Font("Geneva", 2, 32));
fonts.add(new Font("Courier", 3, 32));
WordRenderer wordRenderer = new DefaultWordRenderer(colors, fonts);
Captcha captcha = new Captcha.Builder(150, 50).addText(wordRenderer)).build();
//Output to file
CaptchaServletUtil.writeImage(new FileOutputStream("d:\\captcha.png"), captcha.getImage());
//Show it on the web page
CaptchaServletUtil.writeImage(response, captcha.getImage());
```
if you do not like using it from maven repository,you can just download it by click (https://raw.githubusercontent.com/tavenli/simplecaptcha/master/release/1.2.2/simplecaptcha-1.2.2.jar)





