CImage:KwdGetValEx
The KwdGetValEx method returns a success code and the value of a keyword in the image header. The keyword may be any type of value: string, number, date, time, etc.
sValue, bSuccess = CImage:KwdGetValEx( sKwd ) where |
sKwd is the keyword name.
sValue is the returned value of sKwd. On failure, nil is returned.
bSuccess is the returned success code. If the keyword exists, it is true.
This method returns a boolean success code that tells if the keyword exists in the image header. If true, then the keyword value is also returned. Alternatively, KwdGetVal returns only 1 parameter, which is the keyword value.
Suppose a CImage named I exists and contains keyword "FILTER", a string value, and "GAIN", a number value. The following script returns the value of FILTER and GAIN for the image I:
|
-- gets the keyword if it exists |
|
-- keyword exists |
|
-- prints FILTER= 'Red' |
|
|
|
-- gets the keyword if it exists |
|
-- printf GAIN= 1.52 |