View Full Version : Embed Images in Script??
SIGINT
09-09-2002, 07:35 AM
Hi everybody,
does anyone know if it's possible to embed small images into an
JavaScript? I've seen an Image that was embedded in an SVG graphics and wondered if it's possible to do this in JS...
Thx SIGINT
joh6nn
09-09-2002, 07:50 AM
how do you mean? can you give an example?
SIGINT
09-09-2002, 08:13 AM
Hi joh6nn,
in SVG something like this is possible:
<image width="60" height="60" xlink:href="data:image/jpg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAPAAA/+4ADkFkb2JlAGTAAAAAAf/b
AIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoKDBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxsc
etc...
mZGGFE6uYxYv/9k=" transform="matrix(1 0 0 1 30 80)"/>
This defines a Image,but i don't know if this is only possible in SVG or in pure HTML too.
Thx SIGINT
P.S. : Just cut&paste to html doen't work :-(
SIGINT
09-09-2002, 08:31 AM
Damn,
this works,but only with Netscape 6.x ....
<img src="data:image/jpg;base64,
/9j/4AAQSkZJRgABAgAAZABkAAD/7AAR
etc...
SADF">
Thx SIGINT
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.