Package jj.play.ns.nl.captcha

Examples of jj.play.ns.nl.captcha.Captcha


                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();
View Full Code Here

TOP

Related Classes of jj.play.ns.nl.captcha.Captcha

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.