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

Embedding an image in the html?

Hi;

Is there a way to embed images in the response rather than writing them to
disk and having an <img ...> tag? And if so, how is it done and what browsers
support it?

--
thanks - dave
Dec 23 '05 #1
7 2411
You are unclear about the actual problem.
It's easy to substitute the SRC="" behaviour in ASP.NET and simply stream an
image to the user.
The stream data is up top you.

Be clear..
"David Thielen" <th*****@nospam.nospam> schreef in bericht
news:E3**********************************@microsof t.com...
Hi;

Is there a way to embed images in the response rather than writing them to
disk and having an <img ...> tag? And if so, how is it done and what
browsers
support it?

--
thanks - dave

Dec 23 '05 #2
yes, for browsers like mozilla, firefox, opera and safari that implement rfc
2397, you can include the image in as a base64 encoded. IE does not support
rfc 2397.

<img src="data:image/gif;base64,<base64 encoded image>">
-- bruce (sqlwork.com)

"David Thielen" <th*****@nospam.nospam> wrote in message
news:E3**********************************@microsof t.com...
Hi;

Is there a way to embed images in the response rather than writing them to
disk and having an <img ...> tag? And if so, how is it done and what
browsers
support it?

--
thanks - dave

Dec 23 '05 #3
Right - and that src="anotherasp/image.png" can be handled by me.

But I was wondering if I could add the image to the response that contains
the html - like a MIME email message. That way I don't have to track images
that will be requested shortly and also determine when to dispose of them.

--
thanks - dave
"Edwin Knoppert" wrote:
You are unclear about the actual problem.
It's easy to substitute the SRC="" behaviour in ASP.NET and simply stream an
image to the user.
The stream data is up top you.

Be clear..
"David Thielen" <th*****@nospam.nospam> schreef in bericht
news:E3**********************************@microsof t.com...
Hi;

Is there a way to embed images in the response rather than writing them to
disk and having an <img ...> tag? And if so, how is it done and what
browsers
support it?

--
thanks - dave


Dec 23 '05 #4
Oh wow - this is great. Too bad IE doesn't do this also but we can work based
on browser type. By any chance do you know what version of each it is
supported in?

--
thanks - dave
"Bruce Barker" wrote:
yes, for browsers like mozilla, firefox, opera and safari that implement rfc
2397, you can include the image in as a base64 encoded. IE does not support
rfc 2397.

<img src="data:image/gif;base64,<base64 encoded image>">
-- bruce (sqlwork.com)

"David Thielen" <th*****@nospam.nospam> wrote in message
news:E3**********************************@microsof t.com...
Hi;

Is there a way to embed images in the response rather than writing them to
disk and having an <img ...> tag? And if so, how is it done and what
browsers
support it?

--
thanks - dave


Dec 23 '05 #5
i believe these are the correct versions

opera 7.2 +
safari 1.2 +
firefox 1.0 +
mozilla (2003+)

-- bruce (sqlwork.com)

"David Thielen" <th*****@nospam.nospam> wrote in message
news:73**********************************@microsof t.com...
Oh wow - this is great. Too bad IE doesn't do this also but we can work
based
on browser type. By any chance do you know what version of each it is
supported in?

--
thanks - dave
"Bruce Barker" wrote:
yes, for browsers like mozilla, firefox, opera and safari that implement
rfc
2397, you can include the image in as a base64 encoded. IE does not
support
rfc 2397.

<img src="data:image/gif;base64,<base64 encoded image>">
-- bruce (sqlwork.com)

"David Thielen" <th*****@nospam.nospam> wrote in message
news:E3**********************************@microsof t.com...
> Hi;
>
> Is there a way to embed images in the response rather than writing them
> to
> disk and having an <img ...> tag? And if so, how is it done and what
> browsers
> support it?
>
> --
> thanks - dave


Dec 23 '05 #6
Is this for dynamically generated images (which evt. differ between users)?
Then i can imagne..
"David Thielen" <th*****@nospam.nospam> schreef in bericht
news:1D**********************************@microsof t.com...
Right - and that src="anotherasp/image.png" can be handled by me.

But I was wondering if I could add the image to the response that contains
the html - like a MIME email message. That way I don't have to track
images
that will be requested shortly and also determine when to dispose of them.

--
thanks - dave
"Edwin Knoppert" wrote:
You are unclear about the actual problem.
It's easy to substitute the SRC="" behaviour in ASP.NET and simply stream
an
image to the user.
The stream data is up top you.

Be clear..
"David Thielen" <th*****@nospam.nospam> schreef in bericht
news:E3**********************************@microsof t.com...
> Hi;
>
> Is there a way to embed images in the response rather than writing them
> to
> disk and having an <img ...> tag? And if so, how is it done and what
> browsers
> support it?
>
> --
> thanks - dave


Dec 24 '05 #7
Hi Dave,

IMO, I don't quite recommend using the
<img src="data:image/gif;base64,<base64 encoded image>">

since it's not a standard feature in html, also making image binary mixed
with html content will cause the main page's size increase extremely.....
I'd suggest you consider building an ASP.NET httphandler which help
retrieving image stream from different soruce (database, file system, or
dynamically through GDI+ code) and write them out as a single image stream
... Thus, any other pages can use <img src=xxxx> to reference that
httphandler's url.... here is
#A simple ASP.NET photo album
http://weblogs.asp.net/bleroy/archiv...08/424714.aspx

#Using ASP.NET HTTP Handlers to create a photo album
http://www.microsoft.com/belux/nl/ms...et/httphandler.
mspx

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Bruce Barker" <br******************@safeco.com>
| References: <E3**********************************@microsoft.co m>
<uH*************@TK2MSFTNGP15.phx.gbl>
<73**********************************@microsoft.co m>
| Subject: Re: Embedding an image in the html?
| Date: Fri, 23 Dec 2005 12:57:19 -0800
| Lines: 52
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <#n**************@TK2MSFTNGP14.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: rdcsd1.safeco.com 12.144.134.2
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:366857
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| i believe these are the correct versions
|
| opera 7.2 +
| safari 1.2 +
| firefox 1.0 +
| mozilla (2003+)
|
| -- bruce (sqlwork.com)
|
| "David Thielen" <th*****@nospam.nospam> wrote in message
| news:73**********************************@microsof t.com...
| > Oh wow - this is great. Too bad IE doesn't do this also but we can work
| > based
| > on browser type. By any chance do you know what version of each it is
| > supported in?
| >
| > --
| > thanks - dave
| >
| >
| > "Bruce Barker" wrote:
| >
| >> yes, for browsers like mozilla, firefox, opera and safari that
implement
| >> rfc
| >> 2397, you can include the image in as a base64 encoded. IE does not
| >> support
| >> rfc 2397.
| >>
| >> <img src="data:image/gif;base64,<base64 encoded image>">
| >>
| >>
| >> -- bruce (sqlwork.com)
| >>
| >>
| >>
| >> "David Thielen" <th*****@nospam.nospam> wrote in message
| >> news:E3**********************************@microsof t.com...
| >> > Hi;
| >> >
| >> > Is there a way to embed images in the response rather than writing
them
| >> > to
| >> > disk and having an <img ...> tag? And if so, how is it done and what
| >> > browsers
| >> > support it?
| >> >
| >> > --
| >> > thanks - dave
| >>
| >>
| >>
|
|
|

Dec 26 '05 #8

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

Similar topics

2
by: Dean J. Garrett | last post by:
Hi, I need to create HTML e-mail from an ASP program that includes embedded images that go along with the e-mail, e.g. logos, product image, etc. Is there a technique in HTML that people use to...
3
by: Vroem | last post by:
I wanted to show an MPEG-4 video file on a web page. I'm talking about a real iso-compliant file (with the .mp4 extension.) I've been searching on how to use mime-types but it turns out that you...
3
by: Tim T | last post by:
Hi, I hope there is someone reading this that has the answer, Please Help! I have the need to send a html email via asp.net. its easy enough to send an html email and add attachments. My...
5
by: Joe Bonavita | last post by:
I need to change images with the click of a button but I don't want the entire page to refresh so I thought I should just use an embedded page. I'm trying to use the <object> tag for this but can't...
4
by: Marc Pelletier | last post by:
Hello, I have a class (TideClass) which creates a bitmap image as one of its functions. I want to create a page which has this image embedded amongst some text. I know that I have to stream the...
0
by: Robin Tucker | last post by:
At the moment I have place-holders in my Word document (before you say it, yes I've posted this query in the VBA newsgroups but they are a little slow - in fact reply was non-existent!). I'm...
6
by: Edward | last post by:
I have been doing some research about embedding images in HTML using the data URL src method of the format: <img src="/-/data:image/gif;base64,<DATA>"> My question is, how does one generate...
1
by: MissMarie | last post by:
I've been playing around with DIV tables in myspace to better learn how to rewrite my own code for my business site without having to pay someone to design it. I've tried embedding a slideshow into...
9
by: boycey | last post by:
Hi I have tried to embed a simpleviewer gallery (which works fine as a standalone web page) into a table on an existing web page inorder to show it as a gallery window. The gallery loads but there...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: 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.