I use this piece of code to display PNG (it works fine with JPG btw)
Bitmap img = new Bitmap(System.Drawing.Image.FromFile(strBasePath + frame),368,330);
MemoryStream memStream = new MemoryStream();
img.Save(memStream, ImageFormat.Png);
Response.ContentType ="image/png";
memStream.WriteTo(Response.OutputStream);
what I get is that VS 2003 trys to start debuger in VS in something which seems like header of JPG when I check the properties, but VS trys to debug it like HTML. I switch between debuging of IE code by choose disable debug in IE.
any idea why it doesn't recognize I use PNG file?
Sela
Bitmap img = new Bitmap(System.Drawing.Image.FromFile(strBasePath + frame),368,330);
MemoryStream memStream = new MemoryStream();
img.Save(memStream, ImageFormat.Png);
Response.ContentType ="image/png";
memStream.WriteTo(Response.OutputStream);
what I get is that VS 2003 trys to start debuger in VS in something which seems like header of JPG when I check the properties, but VS trys to debug it like HTML. I switch between debuging of IE code by choose disable debug in IE.
any idea why it doesn't recognize I use PNG file?
Sela