List Info

Thread: Setting the alpha channel and compositing images




Setting the alpha channel and compositing images
user name
2006-07-10 20:11:42
Hi,
    I'm trying to create a image by compositing two images
together using
PerlMagick.  The top image I want to be semi-transparent, so
the image in
the back is visible through it.  I am completely lost as to
how to do it.
I've tried a few things, but nothing works.. I'm sure I'm
making it more
difficult than it should be.

Any help would be greatly appreciated.

Here's an example of what I've tried...


my $image1 = Image::Magick->new();
my $image2 = Image::Magick->new();
$image1->Read($ARGV[0]);
$image2->Read($ARGV[1]);
$image1->Composite(image=> $image2, compose =>
"blend",opacity => 25);

$image->Write("newimage.png");


Dave


_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )