Hi,
I created one bitmap datatype to store image like this
img1 = new Bitmap("C:\\pic\\img.jpg");
then i did some image comparison with other image after that i want to store the another image in the same path C:\\pic\\img.jpg
like this
this.pictureBox1.Image.Save("C:\\pic\\img.jpg");
but the first image is locked it's not storing the new image which i am trying store from the picturebox1
even
File.Delete("C:\\pic\\img.jpg"); is also not working the old image has not deleted because the bitmap image is locked
i saw some article in net the bitmap images will be locked untill they have disposed.
so plese tell me the code to disopose the bitmap images
How to dispose the bitmap data type in c# windows application
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Roei BarRank #1,271 · 1.4K reputationPosted Aug 30, 2009, 12:13 AM EDT