I have an array of images I have resized, what I'm trying to do is save them straight from the array...
foreach (Image I in Resizedimages)
{
string f = Environment.GetFolderPath(Environment.SpecialFolder.Desktop).ToString() + "\\NewImages\\" + names[n];
I.Save(f, System.Drawing.Imaging.ImageFormat.Jpeg);
n++;
}
The problem is EVERY TIME I run the program I get an unhandled exception "A generic error occurred in GDI+" and I know for a fact that it is something to do with the save method. I'm assuming this question has been asked before, and if that is the case then I am sorry. I have tried many different fixes after searching for hours online I thought that maybe it's specific to my program. Any ideas?