Hello! How to erase drawn lines on the preview image of the camera?
Here is the code:
Sub Camera1_Preview (PreviewPic() AsByte)
'get the preview image
IfDateTime.Now > lastPreviewSaved + IntervalMs Then
Dim jpeg() AsByte = camEx.PreviewImageToJpeg(PreviewPic, 70)
lastPreviewSaved = DateTime.Now
DiminAsInputStream
in.InitializeFromBytesArray(jpeg, 0, jpeg.Length)
bmp1.Initialize2(in)
in.Close
EndIf
'draw the line
Dim cvs1 AsCanvas
Dim img1 AsImageView
img1.Initialize (bmp1)
Activity.AddView (img1,0%x,0%y,100%x,100%y)
cvs1.Initialize(img1)
cvs1.DrawLine((X1,Y1,X2,Y2, Colors.Blue,2dip)
EndSub
'to erase drawn line?
Here is the code:
Sub Camera1_Preview (PreviewPic() AsByte)
'get the preview image
IfDateTime.Now > lastPreviewSaved + IntervalMs Then
Dim jpeg() AsByte = camEx.PreviewImageToJpeg(PreviewPic, 70)
lastPreviewSaved = DateTime.Now
DiminAsInputStream
in.InitializeFromBytesArray(jpeg, 0, jpeg.Length)
bmp1.Initialize2(in)
in.Close
EndIf
'draw the line
Dim cvs1 AsCanvas
Dim img1 AsImageView
img1.Initialize (bmp1)
Activity.AddView (img1,0%x,0%y,100%x,100%y)
cvs1.Initialize(img1)
cvs1.DrawLine((X1,Y1,X2,Y2, Colors.Blue,2dip)
EndSub
'to erase drawn line?