CImage:KwdGetVal
The KwdGetVal method returns the value of a keyword from the image header. This method works with a keyword of any type, including string, number, date, time, etc. The value returned is a string.
sValue = CImage:KwdGetVal( sKwd ) |
sKwd is the keyword name.
sValue is the returned value of sKwd .
On success, the method returns a string.
On failure, the method returns nil.
This method returns the value of a keyword of any type. No test is performed to determine if the keyword actually exists but nil is returned for general failure, which could also indicate that the keyword is invalid or improperly formatted. To test whether the keyword exists, call KwdExists before this method. Alternatively, KwdGetValEx returns 2 parameters: a boolean status code and the keyword value.
Suppose a CImage named I exists and contains keywords "FILTER", a string valued keyword, and GAIN, a number valued keyword. The following script returns the value of both keywords from for the image I:
|
-- read the keyword value |
|
-- prints Filter= 'Red' |
|
-- read the keyword value |
|
-- printf Gain= '1.52' |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.