3 |
use Image::Magick; |
use Image::Magick; |
4 |
use DBI; |
use DBI; |
5 |
|
|
6 |
|
my $dest_dir="/data/corp_html/m"; |
7 |
|
|
8 |
sub dump_gif { |
sub dump_gif { |
9 |
my ($text) = @_; |
my ($text) = @_; |
10 |
my $file=$text; |
my $file=$text; |
18 |
$image->ReadImage('xc:#2a377e'); |
$image->ReadImage('xc:#2a377e'); |
19 |
|
|
20 |
$image->Annotate(text=>$text, |
$image->Annotate(text=>$text, |
21 |
geometry=>'+14+22', |
geometry=>'+14+21', |
22 |
font=>"\@arialbd.ttf", |
font=>"\@arialbd.ttf", |
23 |
pointsize=>20, |
pointsize=>20, |
24 |
pen=>'white', |
pen=>'white', |
30 |
#$image->GaussianBlur(radius=>1); |
#$image->GaussianBlur(radius=>1); |
31 |
$image->Scale(geometry=>'50%'); |
$image->Scale(geometry=>'50%'); |
32 |
|
|
33 |
$image->Draw(stroke=>'#cccccc', primitive=>'line', points=>'0,14 118,14', linewidth=>1); |
$image->Draw(stroke=>'#cccccc', primitive=>'line', points=>'0,13 118,13', linewidth=>1); |
34 |
$image->Draw(stroke=>'#cccccc', primitive=>'line', points=>'118,14 118,7', linewidth=>2); |
$image->Draw(stroke=>'#cccccc', primitive=>'line', points=>'118,13 118,7', linewidth=>2); |
35 |
|
|
36 |
|
|
37 |
if (0) { |
if (0) { |
45 |
|
|
46 |
print " -> "; |
print " -> "; |
47 |
|
|
48 |
$image->Write(filename=>"gif:m/$file.gif", |
$image->Write(filename=>"gif:$dest_dir/$file.gif", |
49 |
colors=>256, |
colors=>256, |
50 |
interlace=>"none", |
interlace=>"none", |
51 |
compress=>'lzw'); |
compress=>'lzw'); |