Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: binary image

Reply
Thread Tools

Re: binary image

 
 
Kevin Spencer
Guest
Posts: n/a
 
      09-22-2004
Remember, Mike, that we are talking about an HTML document on the client. An
HTML document is pure text. PURE TEXT! It cannot contain any binary data.
You can't "embed" an image in an HTML document.

So, how DOES an image get "into" an HTML document? By means of an image tag
or JavaScript which creates an image object. In both cases, the image is
loaded from a file. A different file than the HTML document, or the ASP.Net
page that created the HTML document. So, how do you get your image into such
a file? One of 2 ways:

1. Save the image to a file location on the web server, and create an image
tag that points to that location.
2. Write an ASPX page that serves images, using Bitmap.Save(stream). In this
case, you would save it to the Response.OutputStream. Create an image tag
that points to that ASPX page in your other page.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Mike" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm getting an image from the database in binary format using
> response.binaryWrite("image"). I'm trying to use this as a user control to
> be used on several pages. The problem i'm having is when i include this
> control on a page it writes the entire image on the page and overlays
> everything else on the page, Datagrid, labels, etc. How can I put this

image
> in an img tag or datalist or something so i can specify where it should
> reside on the web page?
>
> thx



 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      09-23-2004
this is not strictly true. w3c complaint browsers can include an inline
image, just IE can not.

-- bruce (sqlwork.com)



"Kevin Spencer" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Remember, Mike, that we are talking about an HTML document on the client.

An
> HTML document is pure text. PURE TEXT! It cannot contain any binary data.
> You can't "embed" an image in an HTML document.
>
> So, how DOES an image get "into" an HTML document? By means of an image

tag
> or JavaScript which creates an image object. In both cases, the image is
> loaded from a file. A different file than the HTML document, or the

ASP.Net
> page that created the HTML document. So, how do you get your image into

such
> a file? One of 2 ways:
>
> 1. Save the image to a file location on the web server, and create an

image
> tag that points to that location.
> 2. Write an ASPX page that serves images, using Bitmap.Save(stream). In

this
> case, you would save it to the Response.OutputStream. Create an image tag
> that points to that ASPX page in your other page.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> I get paid good money to
> solve puzzles for a living
>
> "Mike" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I'm getting an image from the database in binary format using
> > response.binaryWrite("image"). I'm trying to use this as a user control

to
> > be used on several pages. The problem i'm having is when i include this
> > control on a page it writes the entire image on the page and overlays
> > everything else on the page, Datagrid, labels, etc. How can I put this

> image
> > in an img tag or datalist or something so i can specify where it should
> > reside on the web page?
> >
> > thx

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
(8-bit binary to two digit bcd) or (8-bit binary to two digit seven segment) Fangs VHDL 3 10-26-2008 06:41 AM
best way to store binary image data in a variable using image magick Jack Perl Misc 2 01-25-2008 10:59 AM
A 64-bit binary returning a value to a 32-bit binary? spammenotplui31@yahoo.ca C Programming 12 04-08-2007 07:02 AM
Advice needed: reading image (binary) data from a db, to be placed in an Image control ?? Denise Smith ASP .Net 2 11-22-2003 02:18 PM
Re: ostreams, ios::binary, endian, mixed binary-ascii Marc Schellens C++ 8 07-15-2003 12:27 PM



Advertisments