Package com.octo.captcha.component.image.deformation

Examples of com.octo.captcha.component.image.deformation.ImageDeformation


    FontGenerator font = new RandomFontGenerator(new Integer(fontSize), Integer.valueOf(fontSize),
        new Font[] { new Font("nyala", Font.BOLD, fontSize),
            new Font("Bell MT", Font.PLAIN, fontSize),
            new Font("Credit valley", Font.BOLD, fontSize) });

    ImageDeformation postDef = new ImageDeformationByFilters(new ImageFilter[] {});
    ImageDeformation backDef = new ImageDeformationByFilters(new ImageFilter[] {});
    ImageDeformation textDef = new ImageDeformationByFilters(new ImageFilter[] {});

    WordToImage word2image = new DeformedComposedWordToImage(font, background, randomPaster, backDef,
        textDef, postDef);
    addFactory(new GimpyFactory(dictionnaryWords, word2image));
  }
View Full Code Here


        FontGenerator font = new RandomFontGenerator(fontSize, fontSize,
                new Font[]{new Font("nyala", Font.BOLD, fontSize),
                        new Font("Bell MT", Font.PLAIN, fontSize),
                        new Font("Credit valley", Font.BOLD, fontSize)});

        ImageDeformation postDef = new ImageDeformationByFilters(
                new ImageFilter[]{});
        ImageDeformation backDef = new ImageDeformationByFilters(
                new ImageFilter[]{});
        ImageDeformation textDef = new ImageDeformationByFilters(
                new ImageFilter[]{});

        WordToImage word2image = new DeformedComposedWordToImage(font,
                background, randomPaster, backDef, textDef, postDef);
View Full Code Here

    FontGenerator font = new RandomFontGenerator(new Integer(fontSize), Integer
        .valueOf(fontSize), new Font[] { new Font("nyala", Font.BOLD, fontSize),
        new Font("Bell MT", Font.PLAIN, fontSize),
        new Font("Credit valley", Font.BOLD, fontSize) });

    ImageDeformation postDef = new ImageDeformationByFilters(new ImageFilter[] {});
    ImageDeformation backDef = new ImageDeformationByFilters(new ImageFilter[] {});
    ImageDeformation textDef = new ImageDeformationByFilters(new ImageFilter[] {});

    WordToImage word2image = new DeformedComposedWordToImage(font, background, randomPaster,
        backDef, textDef, postDef);
    addFactory(new GimpyFactory(dictionnaryWords, word2image));
  }
View Full Code Here

        FontGenerator font = new RandomFontGenerator(fontSize, fontSize,
                new Font[]{new Font("nyala", Font.BOLD, fontSize),
                        new Font("Bell MT", Font.PLAIN, fontSize),
                        new Font("Credit valley", Font.BOLD, fontSize)});

        ImageDeformation postDef = new ImageDeformationByFilters(
                new ImageFilter[]{});
        ImageDeformation backDef = new ImageDeformationByFilters(
                new ImageFilter[]{});
        ImageDeformation textDef = new ImageDeformationByFilters(
                new ImageFilter[]{});

        WordToImage word2image = new DeformedComposedWordToImage(font,
                background, randomPaster, backDef, textDef, postDef);
View Full Code Here

    BackgroundGenerator background = new UniColorBackgroundGenerator(imageWidth, imageHeight, Color.white);
    FontGenerator font = new RandomFontGenerator(fontSize, fontSize, new Font[] {
        new Font("nyala", Font.BOLD, fontSize), new Font("Bell MT", Font.PLAIN, fontSize),
        new Font("Credit valley", Font.BOLD, fontSize) });

    ImageDeformation postDef = new ImageDeformationByFilters(new ImageFilter[] {});
    ImageDeformation backDef = new ImageDeformationByFilters(new ImageFilter[] {});
    ImageDeformation textDef = new ImageDeformationByFilters(new ImageFilter[] {});

    WordToImage word2image = new DeformedComposedWordToImage(font, background, randomPaster, backDef, textDef,
        postDef);
    addFactory(new GimpyFactory(dictionnaryWords, word2image));
  }
View Full Code Here

        imageWidth, imageHeight, Color.white);
    FontGenerator font = new RandomFontGenerator(fontSize, fontSize,
        new Font[] { new Font("nyala", Font.BOLD, fontSize),
            new Font("Bell MT", Font.PLAIN, fontSize),
            new Font("Credit valley", Font.BOLD, fontSize) });
    ImageDeformation postDef = new ImageDeformationByFilters(
        new ImageFilter[] {});
    ImageDeformation backDef = new ImageDeformationByFilters(
        new ImageFilter[] {});
    ImageDeformation textDef = new ImageDeformationByFilters(
        new ImageFilter[] {});

    WordToImage word2image = new DeformedComposedWordToImage(font,
        background, randomPaster, backDef, textDef, postDef);
    addFactory(new GimpyFactory(dictionnaryWords, word2image));
View Full Code Here

    // BackgroundGenerator back = new UniColorBackgroundGenerator(Integer.valueOf(250), Integer.valueOf(150), Color.white);
    BackgroundGenerator back = new FunkyBackgroundGenerator(Integer.valueOf(250), Integer.valueOf(150));
    RandomRangeColorGenerator randomWordColorGenerator = new RandomRangeColorGenerator(new int[] { 10, 30 }, new int[] { 10, 40 }, new int[] { 10, 12 });
    RandomRangeColorGenerator randomBaffleColorGenerator = new RandomRangeColorGenerator(new int[] { 70, 120 }, new int[] { 50, 90 }, new int[] { 90, 150 }, new int[] { 100, 200 });
    TextPaster randomPaster = new DecoratedRandomTextPaster(Integer.valueOf(6), Integer.valueOf(7), randomWordColorGenerator, new TextDecorator[] { new BaffleTextDecorator(Integer.valueOf(1), randomBaffleColorGenerator) });
    ImageDeformation backDef = new ImageDeformationByFilters(new ImageFilter[0]);
    ImageDeformation textDef = new ImageDeformationByFilters(new ImageFilter[0]);
    ImageDeformation postDef = new ImageDeformationByFilters(new ImageFilter[] { water });
    WordToImage word2image = new DeformedComposedWordToImage(shearedFont, back, randomPaster, backDef, textDef, postDef);

    WordGenerator dictionaryWords = new RandomWordGenerator(ERXProperties.stringForKeyWithDefault(WORD_GENERATOR, "BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz2346789"));
    addFactory(new GimpyFactory(dictionaryWords, word2image));
  }
View Full Code Here

                   
                };
    FontGenerator font = new RandomFontGenerator(fontSize-5, fontSize, new Font[] {
        new Font("nyala", Font.BOLD, fontSize)});

    ImageDeformation postDef = new ImageDeformationByFilters(new ImageFilter[] {});
    ImageDeformation backDef = new ImageDeformationByFilters(new ImageFilter[] {});
    ImageDeformation textDef = new ImageDeformationByFilters(new ImageFilter[] {});

    WordToImage word2image = new DeformedComposedWordToImage(font, background, randomPaster, backDef, textDef,
        postDef);
    addFactory(new GimpyFactory(dictionnaryWords, word2image));
  }
View Full Code Here

TOP

Related Classes of com.octo.captcha.component.image.deformation.ImageDeformation

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.