473,385 Members | 1,610 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,385 software developers and data experts.

Display graphic to page

I am writting a control that paints an image to a graphic (created from a bmp).
I want to be able to display the painted image directly without having to
save to file and link to the saved image.
I have been told this can now be done in .NET 2.0.
Is this so? How?

--
Thanks Brian
May 4 '06 #1
3 1590
Brian,

You need to make an aspx page GetImage.aspx that will make the image and
stream it down to the client in the http response .

Eliyahu

"briand" <br****@discussions.microsoft.com> wrote in message
news:4D**********************************@microsof t.com...
I am writting a control that paints an image to a graphic (created from a
bmp).
I want to be able to display the painted image directly without having to
save to file and link to the saved image.
I have been told this can now be done in .NET 2.0.
Is this so? How?

--
Thanks Brian

May 4 '06 #2
Eliyahu,

Yep, I did that and the image is created and displayed. However, the image
takes up the whole page. My page has controls on the left for generating the
image properties, and a control on the right to display the image. I need to
be able to generate the image and place it in other pages without saving to
file.

Can I use some sort of user control, placeholder or literal that will hold
the image amongst the other page content?

my code is:

Image img = MyClass.GenerateImage();
Response.ContentType = :image/jpeg";
img.Save(Response.Outputstream, ImageFormat.Jpeg);
img.Dispose();

I have tried this code in a Web UserControl, but still the whole page is
taken up by the image.

--
Thanks Brian
"Eliyahu Goldin" wrote:
Brian,

You need to make an aspx page GetImage.aspx that will make the image and
stream it down to the client in the http response .

Eliyahu

"briand" <br****@discussions.microsoft.com> wrote in message
news:4D**********************************@microsof t.com...
I am writting a control that paints an image to a graphic (created from a
bmp).
I want to be able to display the painted image directly without having to
save to file and link to the saved image.
I have been told this can now be done in .NET 2.0.
Is this so? How?

--
Thanks Brian


May 11 '06 #3
Brian,

You need to use the url to the image generating page as a regular link to
the image in web or html controls. For example, if you want to get an image
with id 123 and put it into an asp:Image control, you would write

miImage.ImageUrl = 'getImage.aspc?id=123';

Eliyahu

"briand" <br****@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
Eliyahu,

Yep, I did that and the image is created and displayed. However, the image
takes up the whole page. My page has controls on the left for generating
the
image properties, and a control on the right to display the image. I need
to
be able to generate the image and place it in other pages without saving
to
file.

Can I use some sort of user control, placeholder or literal that will hold
the image amongst the other page content?

my code is:

Image img = MyClass.GenerateImage();
Response.ContentType = :image/jpeg";
img.Save(Response.Outputstream, ImageFormat.Jpeg);
img.Dispose();

I have tried this code in a Web UserControl, but still the whole page is
taken up by the image.

--
Thanks Brian
"Eliyahu Goldin" wrote:
Brian,

You need to make an aspx page GetImage.aspx that will make the image and
stream it down to the client in the http response .

Eliyahu

"briand" <br****@discussions.microsoft.com> wrote in message
news:4D**********************************@microsof t.com...
>I am writting a control that paints an image to a graphic (created from
>a
>bmp).
> I want to be able to display the painted image directly without having
> to
> save to file and link to the saved image.
> I have been told this can now be done in .NET 2.0.
> Is this so? How?
>
> --
> Thanks Brian


May 11 '06 #4

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

Similar topics

1
by: chantao | last post by:
Hi I am a total novice to PHP/MYSQL. Please help How do I display a graphic file (e.g. archit01.jpg) as a background i a table of a PHP page if I have a table called gfx and th gfx_ID=archit0...
2
by: Good Man | last post by:
Hi there I have quite a bit of experience with CSS but I am stumped by the following: http://www.electricphase.com/example/example1.php (uses http://www.electricphase.com/example/test1.css) ...
3
by: glbdev | last post by:
Hi. I have a web page which is running a stored procedure. This page has a graphic on it so the user knows something is running and the page is not frozen. This query runs for approx 40...
4
by: André | last post by:
Hi, I try to create and render a graphic among other objects like e.g. tables, labels, buttons. The tables are not a problem, neither the graphic. My problem is that i can't render both...
1
by: icepick72 | last post by:
On an academic note, I want to copy a Graphic to an Image (Bitmap). I have the Graphic object but not the origin image from which it originates; this is because I'm overriding the PrintDocument...
3
by: computer_guy | last post by:
Hi Everyone, I run into a problem. I am trying to write an aspx that can dynamically generate an image based on some input parameters. Things are very simple if the size of the parameters is...
8
by: Haines Brown | last post by:
I want a hot text string to display an image only when hovered. In the body: .... <a id="link-a" href="#nogo"> <img id="photo" src="..." />hot text </a> ....
0
by: bobdydd | last post by:
Hi All I am using the common dialog routine to insert a pathway to a jpeg To display on a form that worked perfectly well in Access 2000. Now using the same setup everything works as before...
9
by: Mel | last post by:
I have some Asp.net 2.0/vb.net code that creates a gantt chart with some dependencies as a new MS Project (.mpp) file. How would I show this resulting .mpp file on an Asp.net webpage? I want to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.