Sub Camera1_Preview (PreviewPic() As Byte)
'prevent queued events from previous camera settings, if any. Just in case
If PreviewPic.Length<>(3*myBitmap.Width*myScale*myBitmap.Height*myScale/2) Then
Log("Not processing")
Return
End If
NV21toRGB.proceed( PreviewPic, myBitmap.Width*myScale, myBitmap.Height*myScale, myScale, myBitmap, camVertical , camEx.Front, camEx.DispRotation, myIndexEffect )
'Add this line (mypixel is an int)
mypixel = myBitmap.GetPixel( myBitmap.width/2,miBitmap.Height/2)
myIV.invalidate 'Refresh the view
End Sub