getImType
Top  Previous  Next

val = getVideoType ( )

Use this function to retrieve the type of the incoming video.

Parameters
 
None  
 
 
Return value
 
The type of the image. Can be one of the following values:  
 
IM_GRAY or IM_GRAY8 – 8-bit grayscale image (256 levels)  
IM_8BIT – 8-bit palettized image (256 colors)  
IM_RGB16 – 16-bit high-color image (5-bit x 3 channels, 32768 colors)  
IM_RGB24 or IM_RGB – 24-bit true-color image (8-bit x 3 channels, 16777216 colors)  
IM_RGB32 – 32-bit true-color image (8-bit x 3 + alpha channel, 16777216 colors)  
IM_RGB48 – 48-bit true-color image (16-bit x 3 channels, 281 trillion colors)  
IM_GRAY16 – 16-bit grayscale image (65536 levels)  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
Example

This set of statements retrieves the type of the video and checks whether it is a 16-bit grayscale image:  
 
type=getVideoType (1)  
if type=IM_GRAY16 THEN print "16-bit grayscale"