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. Since all 3 images must have the same column and row dimensions, you may wish to use the DimEq method to test them before merging.
CImage = CImCombine:RgbMerge( CImageSet ) |
CImageSet contains images for the R, G, and B channels, with the R image at index 1, G at index 2, and B at index 3.
On success, this method returns the merged RGB image as a new CImage.
On failure, this method returns nil.
Suppose that 3 CImage objects exist with names R, G, andB. The following script creates a CImageSet and then merges these images into an RGB image:
|
-- create an image set to hold the images |
|
-- add R channel image to the image set at index 1 |
|
-- add G channel image to the image set at index 2 |
|
-- add B channel image to the image set at index 3 |
|
-- create a CImCombine object |
|
-- merge the channels and return the new RGB CImage |
|
-- delete S if no longer needed |
|
-- delete C if no longer needed |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.