A
active
Private Sub AdjustBitmap()
If b1 Is Nothing Then Exit Sub
Dim b = New Drawing.Bitmap(picData.Width, picData.Height)
Dim g As Graphics = Graphics.FromImage(b)
g.DrawImage(b1, 0, 0)
b1 = b
g.Dispose()
End Sub
Is the above OK? I think I need to Dispose the old Bitmap but don't know
how.
Do I need to Dispose it or will garbage collection take care of it?
If I do, how. Would the following be sufficient?
At the top add bb=b1
At the bottom add bb.Dispose
As always thanks for any helpful info,
Cal
If b1 Is Nothing Then Exit Sub
Dim b = New Drawing.Bitmap(picData.Width, picData.Height)
Dim g As Graphics = Graphics.FromImage(b)
g.DrawImage(b1, 0, 0)
b1 = b
g.Dispose()
End Sub
Is the above OK? I think I need to Dispose the old Bitmap but don't know
how.
Do I need to Dispose it or will garbage collection take care of it?
If I do, how. Would the following be sufficient?
At the top add bb=b1
At the bottom add bb.Dispose
As always thanks for any helpful info,
Cal