Thanks for the help but I never could get this to work. I'm not sure why. I
think it may have something to do with the fact I'm trying to do it inside a
web user control (I'm not sure). But anyway I got around it by saving it to
a file and simply displaying the file.
Thanks again
Gav
"Dennis Myrén" <de****@oslokb.no> wrote in message
news:7J****************@news4.e.nsc.no...
base.Response.ClearContent();
base.Response.ContentType = "image/jpeg";
objBitmap.Save(Response.OutputStream, ImageFormat.Jpeg);
// Important to cancel page HTML rendering:
base.Response.End();
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"Gav" <sp**@spam.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl... Hi all,
I'm trying to create a bitmap and then use outputstream to display the
picture:
objBitmap.Save(Response.OutputStream, ImageFormat.Jpeg);
It doesn't give me any errors although the web page comes up with lots of
characters in the page instead of a picture... I then added:
Response.ContentType= "image/jpeg";
I put this before the outputstream but it didn't make any difference,
does
anybody know what I could be doing wrong?
Regards
Gav