CImage:Val

CImage:ValStr


The ValStr method returns the pixel value at coordinate (x,y) in the form of a string.

Syntax

sVal = CImage:ValStr( x, y )

Example

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:

 

I = CImage:new()

-- Create a CImage

I:Open( sPath )

-- Open the image from file path sPath.

s = I:ValStr(53,400)

-- Return the pixel value at x,y

Printf("value=%s\n",s)

-- print the pixel value

Related Topics

CImage , Val, SetVal