150 + rand.nextInt(55)
);
char[] chars = new char[]{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
Captcha captcha = new Captcha.Builder(200, 50)
.addText(
new TextProducer() {
@Override
public String getText() {
return Integer.toString(code);
}
},
new DefaultWordRenderer(textColor, textFonts))
.addBackground(new FlatColorBackgroundProducer(backgroundColor))
.gimp(new FishEyeGimpyRenderer(fishColor1, fishColor2))
//.addNoise()
//.addBorder()
.build();
BufferedImage image = captcha.getImage();
response.setContentType("image/jpeg");
response.setHeader("Cache-Control", "no-cache, no-store");
response.setHeader("Pragma", "no-cache");
long time = System.currentTimeMillis();