сейчас хоть убей, но картинка просто пустая smile
может кто-то показать рабочую, или в чем проблема?
Код: Выделить всё
#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser); # used only for tests
use CGI;
use strict;
use FindBin qw/$Bin/;
use lib "$Bin/lib";
my $q = new CGI;
use GD::SecurityImage 1.64; # we need the "blank" style
my $font = "StayPuft.ttf";
my $rnd = "10257"; # counter data
my $image = GD::SecurityImage->new(
width => 140,
height => 75,
ptsize => 30,
rndmax => 1, # keeping this low helps to display short strings
frame => 0, # disable borders
font => $font,
);
$image->random( $rnd );
# use the blank style, so that nothing will be drawn
# to distort the image.
$image->create( ttf => 'blank', '#CC8A00' );
$image->info_text(
text => 'Yo',
ptsize => 10,
strip => 1,
color => '#0094CC',
);
$image->info_text(
text => '( c ) 2 0 0 7 m y s i t e',
ptsize => 10,
strip => 0,
color => '#d7d7d7',
y => 'down',
);
my($data, $mime, $random) = $image->out;
binmode STDOUT;
print $q->header(-type => $mime);
print $data;