CImage:Gets
The Gets method returns the pixel value at a the specified coordinates in the form of a string. If the image has an RGB data type, the string includes the separate color channel values. To return the pixel value as a numeric value, use the general Get method. The Getn and Getr methods are available specifically for images of numeric or RGB data type.
sVal = CImage:Gets( x[] )
sVal = CImage:Gets( x )
sVal = CImage:Gets( x, y )
sVal = CImage:Gets( x, y, z )
where
x[] is a coordinate array.
x,y, z are column, row, and plane pixel coordinates, respectively, and may be passed as numbers or strings.
sVal is a string, like "2004.25" or "240,128,44".
The following script shows an image at path sPath being opened and the pixel value at column 53, row 400 being printed to a standard text window:
|
-- Create a CImage |
|
-- Open the image from file path sPath. |
|
-- Return the pixel value at x,y |
|
-- print the pixel value |