|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
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 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.. Show quoteHide quote "David Thielen" <thielen@nospam.nospam> schreef in bericht news:E34D203A-31AB-4B55-9D90-0E31C4B40825@microsoft.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 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. -- Show quoteHide quotethanks - 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" <thielen@nospam.nospam> schreef in bericht > news:E34D203A-31AB-4B55-9D90-0E31C4B40825@microsoft.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 > > > Is this for dynamically generated images (which evt. differ between users)?
Then i can imagne.. Show quoteHide quote "David Thielen" <thielen@nospam.nospam> schreef in bericht news:1D0F8544-66CC-4E94-A65F-0BBDBBBE82CA@microsoft.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" <thielen@nospam.nospam> schreef in bericht >> news:E34D203A-31AB-4B55-9D90-0E31C4B40825@microsoft.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 >> >> >> 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) Show quoteHide quote "David Thielen" <thielen@nospam.nospam> wrote in message news:E34D203A-31AB-4B55-9D90-0E31C4B40825@microsoft.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 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? -- Show quoteHide quotethanks - 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" <thielen@nospam.nospam> wrote in message > news:E34D203A-31AB-4B55-9D90-0E31C4B40825@microsoft.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 > > > i believe these are the correct versions
opera 7.2 + safari 1.2 + firefox 1.0 + mozilla (2003+) -- bruce (sqlwork.com) Show quoteHide quote "David Thielen" <thielen@nospam.nospam> wrote in message news:73416E59-B5D2-4A18-AD06-2437E5ED6868@microsoft.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" <thielen@nospam.nospam> wrote in message >> news:E34D203A-31AB-4B55-9D90-0E31C4B40825@microsoft.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 >> >> >> 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/archive/2005/09/08/424714.aspx #Using ASP.NET HTTP Handlers to create a photo album http://www.microsoft.com/belux/nl/msdn/community/columns/desmet/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" <brubar_nospamplease_@safeco.com> <uHktMd$BGHA.***@TK2MSFTNGP15.phx.gbl> | References: <E34D203A-31AB-4B55-9D90-0E31C4B40***@microsoft.com> <73416E59-B5D2-4A18-AD06-2437E5ED6***@microsoft.com> | Subject: Re: Embedding an image in the html? microsoft.public.dotnet.framework.aspnet:366857| 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: <#n6f3NACGHA.3***@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!TK2MSFTNGP14.phx.gbl | Xref: TK2MSFTNGXA02.phx.gbl Show quoteHide quote | 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" <thielen@nospam.nospam> wrote in message | news:73416E59-B5D2-4A18-AD06-2437E5ED6868@microsoft.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" <thielen@nospam.nospam> wrote in message | >> news:E34D203A-31AB-4B55-9D90-0E31C4B40825@microsoft.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 | >> | >> | >> | | |
Other interesting topics
File security weirdness createing file.
.net objects to javascript? Javascript to Set Focus to TextBox Comparing values between two arrays Compressing and spanning files on upload ASP.NET License or Royalties Modification by JavaScript function won't stay, why? When to use FormsAuthenticationTicket() Cant start debugging - Tearing Hair From Scalp In HUGE CHUNKS ! Listing All computer accounts |
|||||||||||||||||||||||