2
Answers

Convert an image to bmp file

hey_mr_art

hey_mr_art

20y
2.6k
1
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
jhtchina

jhtchina

NA 12 0 20y
1 Transfer image to server. 2 Dispose image in server. 3 down result image to client.
0
bilnaad

bilnaad

NA 686 0 20y
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)