DFranklin
May 5, 2004, 23:52:53
I am having problems with the Overlay.Bitmap property on the LiveDisplay when the ICImagingControl1.MemoryCurrentGrabberColorformat = ICY8. If I start the LiveDisplay in ICY8 then the Overlay.Bitmap Text works fine and displays properly on the LiveDisplay. However If I then change ICImagingControl1.MemoryCurrentGrabberColorformat to ICRGB24 and display some text using OverLay.Bitmap on the LiveDisplay and then go back to ICImagingControl1.MemoryCurrentGrabberColorformat = ICY8, the Overlay.Bitmap Text is no longer showing on the LiveDisplay.
Below is a sample of the code I am trying to run:
NOTE - the default setting for ICImagingControl1.MemoryCurrentGrabberColorformat is ICRGB24,
ICImagingControl1.LiveDisplay = False, ICImagingControl1.VideoFormat = "UYVY (1280x960)", and BW = False
--------------------------------------------------------------------------------
Option Explicit
Dim BW As Boolean
'
'Command Button BW Click
'
Private Sub cmdBW_Click()
If BW = False Then 'Black and White button has not been pressed or the Color function is enabled
ICImagingControl1.LiveStop
BW = True
cmdBW.Caption = "COLOR"
With ICImagingControl1
.MemoryCurrentGrabberColorformat = ICY8 'Set ICImagingControl1 to Black and White (Y8)
.LiveStart
'Draw Overlay text indicating that the live display is black and white
.OverlayUpdateEventEnable = True
.OverlayBitmap.Enable = True
.OverlayBitmap.Font.size = 24
.OverlayBitmap.DrawText RGB(255, 255, 255), 1130, 200, "B/W"
End With
Else 'The Black and White function is enabled, lets change it to color
ICImagingControl1.LiveStop
BW = False
cmdBW.Caption = "B/W"
With ICImagingControl1
.MemoryCurrentGrabberColorformat = ICRGB24 'Set ICImagingControl1 to color (ICRGB24)
.LiveStart
'Draw Overlay text indicating that the live display is color
.OverlayUpdateEventEnable = True
.OverlayBitmap.Enable = True
.OverlayBitmap.Font.size = 24
.OverlayBitmap.DrawText RGB(255, 0, 0), 1130, 7, "Color"
End With
End If
End Sub
Below is a sample of the code I am trying to run:
NOTE - the default setting for ICImagingControl1.MemoryCurrentGrabberColorformat is ICRGB24,
ICImagingControl1.LiveDisplay = False, ICImagingControl1.VideoFormat = "UYVY (1280x960)", and BW = False
--------------------------------------------------------------------------------
Option Explicit
Dim BW As Boolean
'
'Command Button BW Click
'
Private Sub cmdBW_Click()
If BW = False Then 'Black and White button has not been pressed or the Color function is enabled
ICImagingControl1.LiveStop
BW = True
cmdBW.Caption = "COLOR"
With ICImagingControl1
.MemoryCurrentGrabberColorformat = ICY8 'Set ICImagingControl1 to Black and White (Y8)
.LiveStart
'Draw Overlay text indicating that the live display is black and white
.OverlayUpdateEventEnable = True
.OverlayBitmap.Enable = True
.OverlayBitmap.Font.size = 24
.OverlayBitmap.DrawText RGB(255, 255, 255), 1130, 200, "B/W"
End With
Else 'The Black and White function is enabled, lets change it to color
ICImagingControl1.LiveStop
BW = False
cmdBW.Caption = "B/W"
With ICImagingControl1
.MemoryCurrentGrabberColorformat = ICRGB24 'Set ICImagingControl1 to color (ICRGB24)
.LiveStart
'Draw Overlay text indicating that the live display is color
.OverlayUpdateEventEnable = True
.OverlayBitmap.Enable = True
.OverlayBitmap.Font.size = 24
.OverlayBitmap.DrawText RGB(255, 0, 0), 1130, 7, "Color"
End With
End If
End Sub