CImage:KwdGetHmsEx CImage:KwdSetNum

CImage:KwdGetNum


The KwdGetNum method returns the value of a numeric keyword in the image header.

Syntax

number = CImage:KwdGetNum( sKwd )

bullet.gif    sKwd is the keyword name.

bullet.gif    number is the returned value of sKwd.

bullet.gif    On success, the method returns a number.

bullet.gif    On failure, the method returns 0.

Remarks

This method returns the value of a number type keyword. No test is performed to determine if the keyword exists. If the return value is 0, we do not know whether the keyword has the value 0 or that it does not exist. To test whether the keyword exists, call KwdExists before this method. Alternatively, KwdGetNumEx returns 2 parameters: a boolean status code and 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 = I:KwdGetNum("DARKTIME")

-- read the keyword value

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

-- print the value

Related Topics

CImage class

KwdGetNumEx

KwdGetStr

KwdGetVal


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