thinkphp怎么生成验证码
2017-02-28 · 知道合伙人互联网行家
关注
展开全部
GD::Image->trueColor(1);
my $image = newFromPng GD::Image($imagepath) || die "can't open image: $!";
my $white = $image->colorAllocate(255,255,255);
my $scorecolor = $image->colorAllocate(250,228,130);
my $align = GD::Text::Align->new($image,
valign => 'center',
halign => 'left',
color => $white
);
$align->set_font($font_path, 9);
$align->set(color => $white);
$align->set_text($username);
$align->draw($fontx, $fonty, 0);
$image->string(gdMediumBoldFont, $scorex, $scorey, $score, $scorecolor);
return $image->png;
my $image = newFromPng GD::Image($imagepath) || die "can't open image: $!";
my $white = $image->colorAllocate(255,255,255);
my $scorecolor = $image->colorAllocate(250,228,130);
my $align = GD::Text::Align->new($image,
valign => 'center',
halign => 'left',
color => $white
);
$align->set_font($font_path, 9);
$align->set(color => $white);
$align->set_text($username);
$align->draw($fontx, $fonty, 0);
$image->string(gdMediumBoldFont, $scorex, $scorey, $score, $scorecolor);
return $image->png;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询