To get the RGB of a pixel with PerlMagick, you can use:
($red,$green,$blue,$opaque) = split(/,/,$image->Get("pixel[$x,$y]"));
Update: After some thougth I came up with this to solve your first problem:
#!/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');
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...

/brother t0mas

In reply to Re: Image Manipulation Package for setting Opaqueness? by t0mas
in thread Image Manipulation Package for setting Opaqueness? by keith

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.