On 27 Dec 2005, yawnmoth wrote:
http://us2.php.net/manual/en/functio...egif.php#20425
The above URL suggests that it's possible to sorta embed images within
an HTML document so that they don't have to be loaded via a seperate
HTTP request. The idea intrigues me, although I can't seem to get it
working. Is the idea sound or is that link just kinda bogus?
Here's my (failed) attempt:
http://www.geocities.com/terra1024/inline_gif.html
(I apologize for the mangled HTML that geocities produced)
I have an example on my HTML Sampler page:
http://www.chebucto.ns.ca/~af380/html.html#part6a
(and a link to the appropriate RFC).
Use Something like this:
<img src="data:image/gif;base64,base64-encoded image-bytes-go-here"
alt="appropriate-alt-text">
replacing the 'base64-encoded image-bytes-go-here' with the appropriate
base64 representation of the image, adding appropriate alt text and
changing the image type if it's a JPG or PNG file. (One way to get it if
your email reader doesn't store stuff in some proprietary format is to
email the image to yourself as an attachment and then snip the raw
un-decoded base64 code from the email with a text editor. Another way is
to get the UUDEVIEW/UUENVIEW freeware package and use UUENVIEW with the
appropriate switch to encode the image and then snip our the headers it
adds to the base64 code.)
Note that this works with Firefox and Opera but IE version 6 on my machine
doesn't recognise the "data:" protocol.
--
Norman De Forest
http://www.chebucto.ns.ca/~af380/Profile.html af***@chebucto.ns.ca [=||=] (At the Sign of the Flashing Cursor)
"Oh how I miss the days when it was easier to catch gonorhea than a
computer virus." -- Big Will in alt.comp.virus, March 9, 2005