File: shadow_text.pl

package info (click to toggle)
imagemagick 7%3A6.2.4.5.dfsg1-0.15%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 29,972 kB
  • ctags: 13,707
  • sloc: ansic: 202,656; cpp: 17,315; sh: 10,363; xml: 5,523; perl: 4,486; makefile: 3,148; tcl: 459
file content (16 lines) | stat: -rw-r--r-- 502 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl
#
# Make simple text with a shadow.
#
use Image::Magick;

$image=Image::Magick->new(size=>'500x120');
$image->Read('xc:white');
$image->Annotate(font=>'Generic.ttf',fill=>'rgba(100,100,100,100)',
  pointsize=>60, text=>'Works like magick!',geometry=>'+30+90');
$image->Blur('0x1');
$image->Annotate(font=>'Generic.ttf',fill=>'red',stroke=>'blue',pointsize=>60,
  text=>'Works like magick!',geometry=>'+26+86');
$mask=$image->Clone();
$image->Write('shadow.gif');
$image->Write('win:');