aspx to display PNG

Joined
Oct 27, 2006
Messages
2
Reaction score
0
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
 
Joined
Oct 27, 2006
Messages
2
Reaction score
0
more details

tried to run it on another pc and it works fine, so probably there's a problem with the IIS (I got 5.1 and the other one 5.1 as well) or the registry settings?

any idea?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top