473,414 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

How to dynamically stream images through Browser?

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
Nov 18 '05 #1
2 2218
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

Nov 18 '05 #2
Here is a sample:
http://www.aspfree.com/c/a/ASP.NET/R...--C---Part-II/

"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

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: antishok | last post by:
Hi, I'm writing a page which has a somewhat similar folder tree to that of the windows explorer, where each folder is made of a <SPAN> tag consisting of the folder image (closed or open) and the...
6
by: SPG | last post by:
Hi, I wrote a little bit of script that loads an image from a thumbnail when the thumbnail is clicked. It is not very clever, and I have found it only works in IE.. could someone have a look...
8
by: Donald Xie | last post by:
Hi, I noticed an interesting effect when working with controls that are dynamically loaded. For instance, on a web form with a PlaceHolder control named ImageHolder, I dynamically add an image...
7
by: Ryan Taylor | last post by:
Hi. I have some code that dynamically generates a PDF and spits this content directly to the web browser. I use HTMLDoc to create the Pdf's from html. So the user can click on a button "Print...
9
by: Yama | last post by:
Hi, How can I dynamically embed the content of a filename.js into a .aspx page before rendering it to the client? Thanks, ~yamazed
11
by: GaryB | last post by:
Hi Guys, I've been battling with this one for hours - I hope that you can help me! My code modifies the <aon a page, from a standard document link into a link with a tailored onclick event. ...
4
by: CptDondo | last post by:
I have an airlink101 ipcam. It "streams" jpeg images to a web browser. Basically, the camera sends a never-ending http page, and continually retransmits a jpeg image. This sort of works, but...
1
by: | last post by:
I've built an application that scrapes JPG images of webpages and PDF instances of those webpages automatically from an RSS feed. References to the scraped resources are persisted to our database....
1
by: =?Utf-8?B?QWRhbQ==?= | last post by:
I'm having a problem loading an Icon into an ImageList. When I load the icon directly it works fine, like this: Icon sourceIcon = << Get an icon from somewhere... >>;...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.