in reply to Image Manipulation Package for setting Opaqueness?
Update: After some thougth I came up with this to solve your first problem:($red,$green,$blue,$opaque) = split(/,/,$image->Get("pixel[$x,$y]"));
Update 2: It seems that newer versions (>5.25) of IM have replaced the Blend command with Dissolve and wants the opacity to be an integer...#!/usr/bin/perl -w use strict; use Image::Magick; # Simuate background webcam picture... :) my $image1 = Image::Magick->new; $image1->Set(size=>'100x100'); $image1->ReadImage('xc:black'); $image1->Draw(stroke=>'green', primitive=>'rectangle', points=>'5,5 95 +,95'); # Textbackground image my $image2 = Image::Magick->new; $image2->Set(size=>'100x20'); $image2->ReadImage('xc:blue'); # Make composite image of background and a 60.5 % transparent text-bac +kground $image1->Composite(compose=>'Blend', image=>$image2, x=>0, y=>0, opaci +ty=>60.5); # Add un-transparent text atop on background $image1->Annotate(font=>'@c:/windows/fonts/arial.ttf', pointsize=>15, +stroke=>'red', text=>'Whoo',x=>30,y=>15,fill=>'red'); # Write image $image1->Write('x.png');
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Image Manipulation Package for setting Opaqueness?
by keith (Novice) on Mar 07, 2001 at 15:42 UTC | |
Re: Re: Image Manipulation Package for setting Opaqueness?
by keith (Novice) on Mar 07, 2001 at 16:53 UTC | |
by t0mas (Priest) on Mar 07, 2001 at 17:22 UTC | |
by keith (Novice) on Mar 07, 2001 at 17:44 UTC | |
by t0mas (Priest) on Mar 07, 2001 at 18:04 UTC | |
by keith (Novice) on Mar 07, 2001 at 18:44 UTC |