Title: Using URL rather than embedded PNG from SVGGraphics2D

Hi all,

        Does anyone have an example of some code to create an SVG document with an image referenced by a URL, rather than an embedded png? I know the SVG fragment needs to look something like this:

<image x="0" y="0" width="570" xlink:href=""http://www.myimagelink.ishere..." style="text-rendering:geometricPrecision; shape-rendering:geometricPrecision;" height="216"/>

I am currently using the SVGGraphics2D, and reading the image into a buffered image, and then using the draw() to draw the image out. This creates the huge embedded png as so:

<image x="0" y="0" width="570" xlink:href=""data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAADMCAYAAAAfzhMPAAAgAElEQVR42tS9B5wl" Z3Uneqrq5s65J0ozoxlJo1FOCEkoEgQCG4yNgbUXh3V6bwEDxsJhLfwWv8W7+2Pt XT8b+5m1CV7M2rDgJYkgkFDOGmlGo8mhp6d7Ot6cquqdc7766n63bsXuxv69md/9 dfcNdavqO9+J//M/2uLisq1pGtCD/tFPXdf5d9u2wfmVf1ffp/5Tn1OPo/6jz9PD siz3d3oA6Mrv4PMdFn/G/zXgc1Wfo79TqZR7DfRTnrt8zu+fem78rZbVc67y++V7 .........

What I would like to do is on writing the image to the SVG, include the URL as above, not the embedded png. Any suggestions where to look?

tia
Brigette




Reply via email to