Hi, thanks for the reply. Here's some runnable code (it's the closest I can get to how I need my image to look):
use Image::Magick;
use strict;
my $mask = Image::Magick->new(magick=>'png');
my $background = Image::Magick->new(magick=>'png');
my $foreground = Image::Magick->new(magick=>'png');
$mask->Read("png:mask.png");
$background->Set(size=>'500x500');
$background->Read("xc:white");
$background->Set(magick=>'png');
$foreground->Read("foreground.jpg");
$foreground->Set(magick=>'png');
$background->Composite(compose=>'Dissolve', opacity => '87.8%', image=
+>$foreground);
$background->Composite(image=>$mask);
$background->Write("output.png");
exit;
I've had to go round adding 'png' all over the place in attempt to get it working. The mask can be any png with transparency (any kind of watermark), and foreground any 500x500 image.