CImage:KwdGetNumEx


The KwdGetNumEx method returns a success code and the value of a numeric keyword in the image header.

Syntax

nValue, bSuccess = CImage:KwdGetNumEx( sKwd )

bullet.gif    sKwd is the keyword to read.

bullet.gif    nValue is the returned value of sKwd .

bullet.gif    On success, bSuccess is true.

bullet.gif    On failure, bSuccess is false and nValue is 0.

Remarks

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, KwdGetNum returns only 1 parameter, which is the keyword value.

Example

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

t, bOK = I:KwdGetNumEx("DARKTIME")

-- does the keyword exist?

if bOK then

-- keyword exists

  Printf( "Darktime= %lg sec", t )

-- print the value

end

 

Related Topics

CImage class

KwdGetNum

KwdGetValEx

KwdGetStrEx


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.