I am getting following error while showing .tiff
images in a browser.
A generic error occurred in GDI+.
I am converting .tiff
images to .png
and then displaying them in a browser.
My code:
Response.ContentType = "image/png";
Response.AddHeader("content-disposition", "filename=" + Request.QueryString["path"]);
Image img = Image.FromFile(Request.QueryString["path"]);
img.Save(Context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Png);
However this error only comes up in Windows XP. The same code is works fine in Windows 7.