GetImageType
Top  Previous  Next

Description

This COM method returns the array of pixel value at the specified coordinates of the image.


Syntax


[VB]
Value=objImageWarp.GetImageType ( Inp )


[C/C++]
HRESULT GetImagePixel( int Inp, int* pType );


Data Types
[VB]

Inp: Long

Return value: Enumerated. Can be one of the following values:
 
IM_GRAY = 0 – 8-bit grayscale image (256 levels)  
IM_1BIT = 1 – 1-bit palettized image (2 colors)  
IM_4BIT = 4 – 4-bit palettized image (16 colors)  
IM_8BIT = 8 – 8-bit palettized image (256 colors)  
IM_MULTI = 9 – multiphase image (256 bands)  
IM_RGB16 = 16 – 16-bit high-color image (5-bit x 3 channels, 32768 colors)  
IM_RGB24 = 24 – 24-bit true-color image (8-bit x 3 channels, 16777216 colors)  
IM_RGB32 = 32 – 32-bit true-color image (8-bit x 3 + alpha channel, 16777216 colors)  
IM_RGB48 = 48 – 48-bit true-color image (16-bit x 3 channels, 281 trillion colors)  
IM_GRAY16 = 61 – 16-bit grayscale image (65536 levels)  
IM_GRAY32 = 62 – 32-bit grayscale image (4294967296 levels)  
IM_FLOAT = 65 – 32-bit floating point image  
IM_COMPLEX = 76 – 64 bit complex image (32-bit floating point x 2 channels)  


Parameters
[C/C++]

Inp [in]  
Index of the image  
pType [out,retval]  
Pointer to the image type  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  


Example


This VB code grabs an image and retrieves its type


IW.Call("grabIm(1)")
While IW.Status <> SS_IDLE
Wend
type=IW.GetImageType (1)
MsgBox type