Re: [xml-dev] SVG and embedded images?
Lists Home |
Date Index |
In a message dated 19/10/2002 02:22:59 GMT Daylight Time, email@example.com writes:
Can anyone tell me if it's possible to embed a jpg or gif image (probably
base64 encoded) in an SVG? If so, what would the tag syntax be for this?
I read the SVG spec....but it seems that you can only refer to an external
Something like this should do it:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
xmlns:xlink="http://www.w3.org/1999/xlink"><image id="AHWCropped" width="813" height="1293"
Of course, the data must be much longer to display the original JPEG image correctly. I cut the image data a lot to keep the above short. But it should let you see what you wanted as to syntax.
It is also possible to do this with GIFs and, I think, with PNGs.
I hope that helps.
BTW detailed questions on SVG are probably best sent to the SVG-Developers mailing list at