HI All,
I am having a problem saving the image in when using this code. The Language i am using is VB.NET 2005
Dim dlgImage As New OpenFileDialog
dlgImage.Filter = "Image Files (*.bmp, *.gif, *.jpg)|*.bmp;*.gif;*.jpg"
If dlgImage.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim fs As New StreamReader(dlgImage.FileName)
Dim img As Image = Image.FromStream(fs.BaseStream)
fs.Close()
picImage.Image = img
End If
picImage.Image.Save(dlgImage.FileName, ImageFormat.Jpeg)
Here picImage is the Picture Box, Now the problem is that it gives me a error "A generic error occured in GDI+"
Please guide on the same, it would be of great help to me as i am already running late in Project.
Thanks in Advance,
Prashant Hirapara