CImage:Datatype
The Datatype 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.).
sType = CImage:Datatype() where |
sType is a string giving the name of the Mira data type.
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.
Suppose the file sPath contains an image with data type 4, or "int" (32 bit integer) pixels. The following script prints the data type of the image:
|
-- Create a CImage |
|
-- Open the image from file path sPath. |
|
-- retrieve the data type name string |
|
-- result: Data type = long |