I am loading a picture from a logitech camera into a picturebox, however when I try to update the picture, I cannot use the same filename because it is being used by my program. Is there a way to free the picture from my program?
For instance:
Code:Dim bmp as bitmap Dim img as image AxVideoPortal1.PictureToFile(0, 24, "C:\tmp1.bmp", "Gray Scaled Camera") ' This just traps the image from the camera to a bitmap bmp = New Bitmap("c:\documents and settings\mark\desktop\picture 1.bmp") PictureBox1.Image = bmp img = PictureBox1.Image(bmp) grayscale(img) 'routine to get grayscale and change picture box to the grayscaled version




Reply With Quote