Re: Broken image

jonathan wood <[email protected]>
Newsgroups gmane.text.xml.batik.user
Message-ID <CAKiJDQRwQgQ-rQDiJgHveZX5ksGU4t4thmZqdZLha-1gCxHZdw@mail.gmail.com>
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 <[email protected]> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.