PDA

View Full Version : video size



Unregistered
August 20, 2002, 06:26:38
Hi,

I am using a Dazzle DVC 50 and a VCD player to view the video. The problem is, the video display window, is the size of webcam display window. I need a bigger display window, with the control size. Any ideas on how to get it?

Regards
Goutham.V


This message was originally posted by Goutham.V in the old IC Imaging Control Support Forum.

Unregistered
August 20, 2002, 10:45:08
Hello,

To display a resized video image with IC Imaging Control 1.3 in Visual Basic, an Image control is needed. The Image control is able to stretch an image to the size of the control. A PictureBox is not able to stretch an image.

The image must be painted in the ImageAvailable sub in the image control.
Therefore, implement an Image conrol (not a PictureBox) in your form.

In the Form_load sub, IC ImagingControl is set up:

Private Sub Form_Load()

' This causes the image control to stretch the image to the
' size of the control.
Image1.Stretch = True


If ICImagingControl1.DeviceValid = True Then
' Setup IC ImagingControl
ICImagingControl1.ImageRingBufferSize = 5

' IC ImagingControl itself is not visible, the image is shown in the
' ImageAvailable sub.
ICImagingControl1.Visible = False

' LiveCaptureContinuous causes the call to the ImageAvailable sub, where
' the image is painted in the Image control
ICImagingControl1.LiveCaptureContinuous = True
ICImagingControl1.LiveCaptureLastImage = False

' Let IC Imaging Control not show an own video window
ICImagingControl1.LiveDisplay = False

' Resize the Image control to the window size
Form_Resize

ICImagingControl1.LiveStart
Else
MsgBox "Please select a video capture device!"
Unload Me
End If
End Sub

In the ImageAvailable sub, the image is painted:
Private Sub ICImagingControl1_ImageAvailable(ByVal BufferIndex As Long)
ICImagingControl1.ImageBuffers(BufferIndex).Lock

Image1.Picture = ICImagingControl1.Picture
ICImagingControl1.ImageBuffers(BufferIndex).Unlock
End Sub


At least, the Form_Resize sub, to resize the Image control must be implemented:
Private Sub Form_Resize()
Image1.Top = 0
Image1.Left = 0
Image1.Width = Width
Image1.Height = Height
End Sub


The IC Imaging Control version 1.4 will support video window resizing directly

Best regards
Stefan
IC Support


This message was originally posted by Stefan in the old IC Imaging Control Support Forum.

Unregistered
August 21, 2002, 09:13:17
Hi Stefan

Thank you for your support. It worked.
Thank you

Goutham.V


This message was originally posted by Goutham.V in the old IC Imaging Control Support Forum.

Unregistered
January 7, 2003, 14:08:46
Hello,

IC 1.4 is now shipping.

Best regards
Johannes
IC Support


This message was originally posted by IC Support in the old IC Imaging Control Support Forum.