Convert an image to bmp file
Good day,
I have a code that runs well using windows forms. This is the code:
>>System.Drawing.Image imgSource = System.Drawing.Image.FromFile("c:\\test.gif");
>>imgSource.Save("c:\\test.bmp", System.Drawing.Imaging.ImageFormat.Bmp);
But when I tried this on webforms, this error occured:
"A generic error occurred in GDI+."
How come?
Arthur
Answers (2)
0
1 Transfer image to server.
2 Dispose image in server.
3 down result image to client.
0
It's fairly possible this isn't fully supported in webforms. When you encounter such errors read MSDN if they are supported (web based). It's logical that it's not permitted to save an image to a client via webforms(security)