Hello
if you already have an image file somewhere
string filaname = "C:\myimage.png");
Response.ContentType = "image/png";
Response.WriteFile(filaname);
Response.End();
Or if you want to generate the image dynamically
int width = 400, height = 300; // 400 * 300 image
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(width, height);
// Do some drawing with the bmp object ...
Response.ContentType = "image/png";
bmp.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Png);
Response.End();
Best regards,
Sherif
"Raed Sawalha" <ra**********@hotmail.com> wrote in message
news:eL**************@TK2MSFTNGP14.phx.gbl...
I have seen on some websites, image references that instead of image, are
other ASP, ASP.NET or CGI pages. The link would be like <img
src="imagegenerator.asp?imageid=1235">. I would like to use this
technique to dynamically deliver images to the user. How do i create the "back-end"
page to read an image file and then "stream" that raw image data to the
user?
Regards