SwapBytes
Top  Previous  Next

Description

Enables/disables swapping of bytes for 16- and 48-bit video modes.


Syntax


[VB]
objActiveDcam.SwapBytes [= Value]


[C/C++]
HRESULT get_SwapBytes ( bool *pSwapBytes );
HRESULT put_SwapBytes( bool SwapBytes );



Data Type
[VB]

Boolean


Parameters
[C/C++]

pSwapBytes [out,retval]  
Pointer to the Boolean that is TRUE if the byte swap is enable, or FALSE otherwise  
SwapBytes [in]  
Set to TRUE to enable the byte swap mode, or set to FALSE otherwise  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  
 

Example


This VB example activates the byte swap mode:

ActiveDcam1.SwapBytes = 
True

MsgBox ActiveDcam1.SwapBytes
 

Remarks


This property defines the way in which 16-bit pixels are arranged in ActiveDcam image buffer. If SwapBytes is set to FALSE, the bytes in each pixel will maintain the order in which they are delivered by the camera. Some cameras however can render the most significan bits of each pixel in the high-order bytes and the least significant bits in the low-order bytes. If this happens, the live image will appear scrambled. Setting SwapBytes to TRUE will activate a real-time swap of bytes in incoming camera frames and restore original pixel values.

Note that this property is availalbe only in 16- and 48-bit video Modes.