/[corp]/pics/down.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /pics/down.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Thu Mar 15 07:51:21 2001 UTC (23 years ago) by dpavlin
Branch: DbP, MAIN
CVS Tags: r1, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
initial import

1 #!/usr/local/bin/perl -w
2
3 use Image::Magick;
4
5 sub dump_gif {
6 my ($text) = @_;
7 my $file=$text;
8 $file=~s/[^a-zA-Z]+/_/g;
9
10 print "$text";
11
12 $image = Image::Magick->new;
13 $image->Set(size=>'125x11');
14 #$image->Set(size=>'250x30');
15 $image->ReadImage('xc:#ffffff');
16 #$image->Read(filename=>"gif:template/contact.gif");
17
18 $image->Scale(geometry=>'300%');
19
20 #($x_ppem, $y_ppem, $ascender, $descender, $width, $height, $max_advance) =
21 # split(', ', $image->QueryFontMetrics(text=>$text,font=>"\@/usr/local/ttfonts/arialbd.ttf", pointsize=>20));
22
23 $image->Annotate(text=>$text,
24 geometry=>'+1+0',
25 font=>"\@/usr/local/ttfonts/arialbd.ttf",
26 pointsize=>35,
27 pen=>'#333399',
28 align=>'left');
29
30 #$image->Resize(geometry=>'125x15', filter=>'Lanczos', blur=>1.8);
31 #$image->GaussianBlur(radius=>1);
32 $image->Scale(geometry=>'33%');
33
34 #$image->Draw(stroke=>'#cccccc', primitive=>'line', points=>'0,14 118,14', linewidth=>1);
35 #$image->Draw(stroke=>'#cccccc', primitive=>'line', points=>'118,14 118,7', linewidth=>2);
36
37
38 if (0) {
39 $image->Annotate(text=>
40 geometry=>'+7+2',
41 font=>"\@/usr/local/ttfonts/arialbd.ttf",
42 pointsize=>10,
43 pen=>'white',
44 align=>'left');
45 }
46
47 print " -> ";
48
49 $image->Trim();
50
51 $image->Write(filename=>"gif:b/$file.gif",
52 colors=>256,
53 interlace=>"none",
54 compress=>'lzw');
55
56 print "$file.gif\n";
57
58 }
59
60 @words = ( "HOME", "ABOUT US", "PRODUCTS", "INVESTOR'S PAGE", "R&D",
61 "CAREERS", "|", "BACK", "Read More", "PDF" );
62
63 foreach (@words) {
64 dump_gif($_);
65 }

  ViewVC Help
Powered by ViewVC 1.1.26