I am using my own class for image processing , like load , thumbnail , ....
In general , this code create images object;
Bitmap result = new Bitmap(width, height, PixelFormat.Format32bppArgb);
and this code post it to response
object to show in browser.
HttpContext.Current.Response.AddHeader("ContentType", "image/png");
using (MemoryStream memStream = new MemoryStream())
{
memStream.Seek(0, SeekOrigin.Begin);
Result.Save(memStream, ImageFormat.Png);
memStream.WriteTo(HttpContext.Current.Response.OutputStream);
}
Result.Dispose();
In some cases , the browser(s) show the correct image but sometimes show the cropped image like this.
Is this image breaking related to my code or related to browsers ?