gri6507 has asked for the wisdom of the Perl Monks concerning the following question:
What I now want is to figure out a way to make the rectangle semi-transparent. Please help.use strict; use Image::Magick; my ($image, $x); $image = Image::Magick->new; $x = $image->Set(size=>'100x100'); warn "$x" if $x; $x = $image->ReadImage('xc:none'); warn "$x" if $x; $x = $image->Draw(primitive=>'rectangle', points=>'5,5,50,25', fill=>' +white'); warn "$x" if $x; #$image->MatteFloodfill(x=>6, y=>6, matte => 90); <== gives 'Unrecogn +ized option (matte)' error $x = $image->Annotate(font=>'/usr/share/fonts/bitstream/Vera.ttf', fil +l=>'#00FF00', pointsize=>12, x=>10, y=>20, text=>'Hi'); warn "$x" if +$x; $x = $image->Write('x.png'); warn "$x" if $x; undef $image;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Another Image::Magick question
by GrandFather (Saint) on Oct 10, 2005 at 21:00 UTC |