User-188340420 posted
I am having problem with bold part of code.
Response.ContentType = "image/bmp";
b.Save(Response.OutputStream, ImageFormat.Bmp);
Ok, here is the problem: When I set image format to Gif, this code works perfect. But, when I set it to Bmp or Png, it throws an exception during runtime:
A generic error occurred in GDI+
So, why such difference between Bmp/Png and Gif(which works)?