fixed captcha
This commit is contained in:
parent
842eb4a331
commit
d89b8f1794
3 changed files with 7 additions and 4 deletions
|
|
@ -3,6 +3,8 @@
|
|||
- Fixed a problem with the slide panel where the links would sometimes take
|
||||
the properties of the style.
|
||||
- fix [ 1302878 ] testEnvironment.pl does not check versions (Wouter van Oijen / ProcoliX)
|
||||
- fix [ 1238223 ] captcha image broken in WRE
|
||||
- fix [ 1288783 ] Captcha picture only works with the latest ImageMagick.
|
||||
|
||||
|
||||
6.7.5
|
||||
|
|
|
|||
|
|
@ -62,12 +62,13 @@ sub addFileFromCaptcha {
|
|||
srand;
|
||||
$challenge.= ('A'..'Z')[rand(26)] foreach (1..6);
|
||||
my $filename = "captcha.".WebGUI::Id::generate().".png";
|
||||
my $image = Image::Magick->new;
|
||||
my $image = Image::Magick->new();
|
||||
$image->Set(size=>'105x26');
|
||||
$image->ReadImage('xc:white');
|
||||
$image->Annotate(pointsize=>20, skewY=>5, skewX=>11, gravity=>'center', fill=>'black', antialias=>'true', text=>$challenge);
|
||||
$image->Swirl(degrees=>10);
|
||||
$image->AddNoise(noise=>'Multiplicative');
|
||||
$image->AddNoise(noise=>"Multiplicative");
|
||||
$image->Annotate(font=>$session{config}{webguiRoot}."/lib/default.ttf", pointsize=>30, skewY=>0, skewX=>0, gravity=>'center', fill=>'white', antialias=>'true', text=>$challenge);
|
||||
$image->Blur(geometry=>"1");
|
||||
$image->Set(type=>"Grayscale");
|
||||
$image->Border(fill=>'black', width=>1, height=>1);
|
||||
$image->Write($self->getPath($filename));
|
||||
return ($filename, $challenge);
|
||||
|
|
|
|||
BIN
lib/default.ttf
Normal file
BIN
lib/default.ttf
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue