I'm extracting the alpha channel as a greyscale image with something effectively like:
Code: Select all
my $alphagreyscale=$original->Clone();
$alphagreyscale->Separate(channel=>'Alpha');
Code: Select all
my $greenblock=Image::Magick->new();
$greenblock->ReadImage('xc:green[1000x1000!]');
my $target=Image::Magick->new();
$target->ReadImage('canvas:transparent[1000x1000!])';
$target->Composite(image=>$greenblock, mask=>$alphagreyscale);
Is there any way I can make the masking happen the way I want, or I can do the opposite of the ->Separate in order to apply my greyscale image as an alpha channel?
Thanks all!
Jont.