CImCombine:RgbMerge
The RgbMerge method creates a new RGB color image by merging R, G, and B channel images from the first 3 members of a CImageSet.
CImage = CImageSet:RgbMerge( CImageSet ) |
Suppose that 3 CImage objects exist with names R,G, and B and have the same dimensions (the DimEq method can be used to test this before merging). The following script fragment merges these images into an RGB image:
|
-- create an image set to hold the images |
|
-- add channel images to the image set |
|
|
|
|
|
-- create a CImCombine object |
|
-- merge the channels and return a new CImage |
|
-- delete S if no longer needed |
|
-- delete C if no longer needed |