I am deleting file from Folder. But, It is showing Error :
The process cannot access the file ..... because it is being used by another process.
Don't know that is the wrong. I am also Closing Stream.
My Code is as below :
bmp.SetResolution(OriginalImage.HorizontalResolution, OriginalImage.VerticalResolution);
using (System.Drawing.Graphics Graphic = System.Drawing.Graphics.FromImage(bmp))
{
Graphic.SmoothingMode = SmoothingMode.AntiAlias;
Graphic.InterpolationMode = InterpolationMode.HighQualityBicubic;
Graphic.PixelOffsetMode = PixelOffsetMode.HighQuality;
Graphic.DrawImage(OriginalImage, new System.Drawing.Rectangle(0, 0, Width, Height), X, Y, Width, Height, System.Drawing.GraphicsUnit.Pixel);
MemoryStream ms = new MemoryStream();
...
Go to the complete details ...