Hello!
I wander how to combine 3 grey channels into RGB composite by a Perl script.
I tried
$image->Read('red.tif', 'green.tif', 'blue.tif');
$image->Composite(image=>$image, compose=>'rgb');
$image->Write('composite.tif');
but it just returns grey composite.
Then I tried to compose image from channels using step by step compose=>'Copy/Red/Green/Blue/' and again have only grey composite.
Is there any solution to do RGB composite? (not using command line)
Thanks.
[done] How to combine image from R+G+B channels in Perl?
[done] How to combine image from R+G+B channels in Perl?
Last edited by vassapup on 2009-08-28T02:50:50-07:00, edited 1 time in total.
Re: How to combine image from R+G+B channels in Perl?
This works:
$red->Composite(image=>$green, compose=>'CopyGreen');
$red->Composite(image=>$blue, compose=>'CopyBlue');
(having $red $green $blue as grayscale images, we'll obtain in $red RGB composite)
$red->Composite(image=>$green, compose=>'CopyGreen');
$red->Composite(image=>$blue, compose=>'CopyBlue');
(having $red $green $blue as grayscale images, we'll obtain in $red RGB composite)