Hi fireball,

  You may not be resolving the url properly - You may need to call
SVGOMDocument.setDocumentURI()
or set the xml:base attribute in the svg document.



On Fri, Aug 17, 2012 at 12:11 PM, fireball <samiib...@hotmail.com> wrote:

> I am trying to load an svg which has a link to an image. The reslut is a
> broken image.
>
> My loading into canvas and the broken image is very similar to
> http://batik.2283329.n4.nabble.com/Broken-image-embedded-PNG-td3962524.html
> http://batik.2283329.n4.nabble.com/Broken-image-embedded-PNG-td3962524.html
>
> Note that the image resides in the same directory where the SVG file is.
>
> My SVG:
> <svg
>    xmlns="http://www.w3.org/2000/svg";
>    xmlns:xlink="http://www.w3.org/1999/xlink";
>    version="1.1">
>   <g
>      id="image"
>      transform="matrix(1,0,0,1,0,0)">
>      <image width="200" height="180" xlink:href="image.png"/>
>   </g>
> </svg>
>
>
>
> When loaded it becomes:
> ...
> <g id="image" transform="matrix(1, 0, 0, 1, 0,0)">
> <image width="200" xmlns:xlink="http://www.w3.org/1999/xlink";
> xlink:href="image.png" xlink:type="simple" xlink:actuate="onLoad"
> height="180" preserveAspectRatio="xMidYMid meet" xlink:show="embed"/>
> </g>
> ...
>
> Any thoughts of how to resolve this issue?
>
>
>
> --
> View this message in context:
> http://batik.2283329.n4.nabble.com/Broken-image-tp4655209.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org
>
>

Reply via email to