CImage:Val
The Val method returns the pixel value at coordinate (x,y). The value is returned as a number, even for a color image. The ValStr method returns the value as a string, which can accommodate color values.
nVal = CImage:Val( x, y ) |
The following script fragment 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 |