App-ZofCMS-PluginBundle-Naughty
view release on metacpan or search on metacpan
lib/App/ZofCMS/Plugin/Captcha.pm view on Meta::CPAN
tcolor => '#895533',
lcolor => '#000000',
}
sub _do {
my ( $self, $conf, $t, $q, $config ) = @_;
my $image = GD::SecurityImage->new(
width => $conf->{width},
height => $conf->{height},
lines => $conf->{lines},
gd_font => 'giant'
);
$image->random( $conf->{string} );
$image->create('normal', @$conf{qw/style tcolor lcolor/} );
if ( $conf->{particle} ) {
$image->particle( ref $conf->{particle} ? @{ $conf->{particle} } : () );
}
my ( $image_data, $mime_type, $random_number ) = $image->out( force => $conf->{format} );
( run in 1.382 second using v1.01-cache-2.11-cpan-ceb78f64989 )