Help for this page
composite -dissolve 87.8 foreground.jpg -size 500x500 xc:white output. +jpg; composite mask.png output.jpg output.jpg
my $mask = Image::Magick->new; my $background = Image::Magick->new; ... $background->Composite(compose=>'Dissolve', opacity => '87.8', image=> +$foreground); $background->Composite(image=>$mask); $background->Write("output.jpg");