This is a customizable captcha image generator.
CaptchaGenerator captchaGenerator = new CaptchaGenerator();
BufferedImage image = captchaGenerator.generate(200, 50, "ABCDEF");
Load fonts from a directory and CaptchaGenerator
will use them:
FontRepository.loadFonts("./sample-fonts/");
Setup a background:
captchaGenerator.setBackground(new CirclesBackground());
// or
captchaGenerator.setBackground(new GradientBackground(true));
And you can add effects on both background and char images:
captchaGenerator.addBackgroundFilter(new CrossFilter(10, 1, true));
captchaGenerator.addCharImageFilter(new CrossFilter(10, 1, true));
And you can also create your own effects!