| 1 |
#!/usr/bin/perl |
| 2 |
# regression test for #1032998 |
| 3 |
use GD::SecurityImage use_magick => 1; |
| 4 |
use MIME::Base64 qw(encode_base64); |
| 5 |
|
| 6 |
my $image = GD::SecurityImage->new( |
| 7 |
width => 200, |
| 8 |
height => 100, |
| 9 |
lines => 4, |
| 10 |
gd_font => 'Giant', |
| 11 |
scramble => 1, |
| 12 |
rndmax => 10, |
| 13 |
); |
| 14 |
$image->random; |
| 15 |
$image->create( 'normal', 'default', "#403030", "#FF644B" ); |
| 16 |
print '================== PNG as base64 ==========================='; |
| 17 |
print encode_base64($image->out( force => 'png' )); |
| 18 |
print '================== END of png =============================='; |