CImage:Datatype CImage:Date

CImage:DatatypeStr


The DatatypeStr method returns the name of the image data type as a string. The data type refers to the value representation stored in the pixel (integer, real, etc.).

Syntax

sType = CImage:DatatypeStr()

    wheresType is a string giving the name of the Mira data type (see Remarks).

Remarks

The data type string returned by this method is defined in the Mira Data Types table. You can also use the Datatype method to retrieve the data type as a numeric code.

Example

Suppose the file sPath contains an image with data type 4, or "long" (32 bit integer) pixels. The following script fragment prints the data type of the image:

I = CImage:new()

-- Create a CImage

I:Open( sPath )

-- Open the image from file path sPath.

s = I:DatatypeStr()

-- retrieve the data type name string

Printf( "Data type = %s\n",s)

-- result: Data type = long

I:delete()

-- delete the CImage from memory

Related Topics

CImage, Datatype