
| Language: | Visual Basic 6 |
| Version: | 3.0.3 |
| Released on: | April 7, 2005 |
| Author: | IC Imaging Control Support Department |
| Requirements: | IC Imaging Control >2.1 Camera, converter or grabber with WDM Stream Class drivers. |
| |
Image data streams to be display in live mode in a window often have to be adapted to the size of this window. The following programming example (Visual Basic) shows how you can use IC Imaging Control to "trim" the image data stream. Please note that only the image data streams representation is trimmed. Thus, the image data stream itself remains "untouched".
The sample application's window looks as follows:

The program starts by activating a built-in dialog to select a device (.ShowDeviceSettingsDialog). Before the "truing" we have to tell IC Imaging Control not to use the image data stream's default resolution (.LiveDisplayDefault). Then, we simply use the output window's height and width (.Height and .Width) to determine the size the image data stream has to be displayed with (.LiveDisplayHeight and .LiveDisplayWidth). Thereupon the device's live image data stream is displayed using .LiveStart:
Private Sub Form_Load() ICImagingControl1.ShowDeviceSettingsDialog If ICImagingControl1.DeviceValid Then ICImagingControl1.LiveDisplayDefault = False ICImagingControl1.LiveDisplayHeight = ICImagingControl1.Height ICImagingControl1.LiveDisplayWidth = ICImagingControl1.Width ICImagingControl1.LiveStart Else Unload Me End If End Sub
Disclaimer
The source code that appears in the IC Imaging Control Source Code Library is indented for educational purposes only. The Imaging Source Europe GmbH, the manufacturer of IC Imaging Control, does not assume any kind of warranty expressed or implied, resulting from the use of the content of this page.