Captcha image quality

110 views
Skip to first unread message

Tharbeat Hendricks

unread,
Jul 18, 2012, 6:51:45 AM7/18/12
to cage...@googlegroups.com
Hi there
Is there any way to change the image properties?
The quality, size, height and width of the drawn images are acesable via getters.
I do not how to change theses values or if it is changeable at all

Regargs Tharbeat

Tharbeat Hendricks

unread,
Jul 18, 2012, 9:33:31 AM7/18/12
to cage...@googlegroups.com
Regards Tharbeat

Hi all I have found how to do this by using the Painter Class and using the constructer with parameters

Painter

public Painter(int width,
               int height,
               Color bGround,
               Painter.Quality quality,
               EffectConfig effectConfig,
               Random rnd)
Constructor.

Parameters:
width - captcha image width, default DEFAULT_WIDTH
height - captcha image height, default DEFAULT_HEIGHT
bGround - background color of captcha image, default white, can be null
quality - captcha image quality, default Painter.Quality.MAX, should use max it does not have measurable speed penalty on modern jvm-s (1.6u23), can be null
effectConfig - used to define what effects should be used, can be null
rnd - random generator to be used, can be null

        return new Cage(painter, null, null, null, null, null, null);
    }
Reply all
Reply to author
Forward
0 new messages