CImage:KwdSetSect CImage:KwdGetStrEx

CImage:KwdGetStr


The KwdGetStr method returns the value of a string keyword in the image header.

Syntax

sValue = CImage:KwdGetStr( sKwd )

    sKwd is the keyword name.

    sValue is the returned value of sKwd .

    On success, the method returns true.

    On failure, the method returns nil.

Remarks

This method returns the value of a string type keyword. 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, KwdGetStrEx returns 2 parameters: a boolean status code and the keyword value.

Example

Suppose a CImage named I exists and contains keyword "FILTER". The following script fragment returns the value of FILTER for the image I:

 

f = I:KwdGetStr("FILTER")

-- read the keyword value

Printf( "Filter= '%s'",f)

-- print the value

Related Topics

CImage, KwdGetStrEx, KwdGetVal, KwdGetNum, KwdGetDMS, KwdGetHMS