473,545 Members | 1,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1593
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****@discuss ions.microsoft. com> wrote in message
news:4D******** *************** ***********@mic rosoft.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.Generat eImage();
Response.Conten tType = :image/jpeg";
img.Save(Respon se.Outputstream , ImageFormat.Jpe g);
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****@discuss ions.microsoft. com> wrote in message
news:4D******** *************** ***********@mic rosoft.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.ImageUr l = 'getImage.aspc? id=123';

Eliyahu

"briand" <br****@discuss ions.microsoft. com> wrote in message
news:62******** *************** ***********@mic rosoft.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.Generat eImage();
Response.Conten tType = :image/jpeg";
img.Save(Respon se.Outputstream , ImageFormat.Jpe g);
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****@discuss ions.microsoft. com> wrote in message
news:4D******** *************** ***********@mic rosoft.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
1610
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 Many thanks :D
2
9592
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) http://www.electricphase.com/example/example2.php (uses http://www.electricphase.com/example/test2.css)
3
1561
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 seconds. I would like to be able to display the HTML (graphic) before running this sproc. As it is right now, the page just sits blank until the...
4
1772
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 together. With the code below, i only see the graphic, nothing else (no table, label, button). How can i see the table and below the table, the graphic?
1
3476
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 class OnPagePrint method which only provides me an e.Graphic (see code sample below). The FCL doesn't seem to natively support Graphic...
3
3599
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 small and I can put them on the URL and pass them in as HTTP GET. In my image generation script I just need to read the parameters and then pump out...
8
6542
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
1753
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 until the last moment When Access 2007 gives the message "Graphic Filters Not Installed" and the image does not display. I have installed the Graphic...
9
5972
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 show the Gantt Chart as a graphical object on my webpage and display it as read only.
0
7669
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7926
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7439
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7773
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5343
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4962
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3468
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1028
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.