CImage:ExtractByte
The ExtractByte method creates a new image containing a byte plane from a numeric image. For example, this creates an image consisting of the high order byte of a ushort type image.
CImage = CImage:ExtractByte( nPlane ) where |
nPlane is the plane number, beginning at 1.
CImage is a new CImage object containing the extracted byte plane.
On success, this method returns a new CImage object.
On failure, this method returns nil.
Suppose that a CImage I exists and has long data type. The following script creates 4 new images, one each for the 4 bytes of the original image pixels:
|
-- create an image set to hold the images |
|
-- do for each of the 3 channels |
|
-- extract the byte plane to a new image |
|
-- add to the end of the image set |
|
|
|
-- retrieve the lowest order byte plane |