Package nl.captcha.backgrounds

Examples of nl.captcha.backgrounds.GradiatedBackgroundProducer


    public void doGet(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {

        Captcha captcha = new Captcha.Builder(_width, _height)
          .addText()
          .addBackground(new GradiatedBackgroundProducer())
            .gimp()
            .addNoise()
            .addBorder()
            .build();
View Full Code Here


          captcha = new Captcha.Builder(_width, _height)
                .addText(new ChineseTextProducer())
                .gimp()
                .addBorder()
                  .addNoise()
                  .addBackground(new GradiatedBackgroundProducer())
                  .build();

          session.setAttribute(NAME, captcha);
          CaptchaServletUtil.writeImage(resp, captcha.getImage());
         
View Full Code Here

    private volatile Captcha captcha;

    public void serveCaptcha(String id, Locale locale, String format, OutputStream out) throws IOException {
        captcha = new Captcha.Builder(widht, height)
                .addText()
                .addBackground(new GradiatedBackgroundProducer())
                .gimp()
                .addNoise()
                .addBorder()
                .build();
        renderCaptcha(captcha.getImage(), format, out);
View Full Code Here

TOP

Related Classes of nl.captcha.backgrounds.GradiatedBackgroundProducer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.