Hello,

Have you checked some other stuff. Read permission, enough memory (VM Settings, 
-Xms, -Xmx) ?

Mfg

-----Ursprüngliche Nachricht-----
Von: Kevin Gamiel [mailto:kgam...@renci.org] 
Gesendet: Dienstag, 01. November 2011 06:02
An: <batik-users@xmlgraphics.apache.org>
Betreff: Re: Broken image, embedded PNG

Hmmm, this is my first batik app, probably missing something.

Here is a test app that demonstrates the problem.  I included a second URL in a 
comment that does work for comparison:

<code>
import javax.swing.*;
import java.awt.*;
import org.w3c.dom.svg.*;
import org.w3c.dom.*;
import org.apache.batik.swing.*;
import org.apache.batik.util.XMLResourceDescriptor;
import org.apache.batik.dom.svg.SAXSVGDocumentFactory;

public class TestPanel extends JFrame {
    public TestPanel() throws Exception {
        try {
            JPanel p = new JPanel();
            p.setLayout(null);
            p.setBounds(0, 0, 500, 500);
            JSVGCanvas canvas = new JSVGCanvas();
            canvas.setBounds(0, 0, 500, 500);
            p.add(canvas);
            String parser = XMLResourceDescriptor.getXMLParserClassName();
            SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
            Document doc = f.createDocument(
                "http://www.renci.org/~kgamiel/web/gauge/img/Tick1.svg";);
                // NOTE, works for this URL
                //"http://www.renci.org/~kgamiel/web/gauge/img/dial.svg";);
            canvas.setDocument(doc);
            getContentPane().add(p);
            this.setBounds(0, 0, 500, 500);
        } catch(Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) throws Exception {
        new TestPanel().setVisible(true);
    }
}
</code>

Kevin

--
RENCI
http://www.renci.org
Proud charter member of Tar Heel Information Services - "Nothing but Net!"

On Nov 1, 2011, at 12:15 AM, Zainab AlMeraj wrote:

> Hi,
> 
> I have loaded it onto a JSVGCanvas and it looks fine. 
> 
> The problem maybe something else.
> 
> Zainab
> 
> 
> 
> On Tue, Nov 1, 2011 at 12:00 AM, Kevin Gamiel <kgam...@renci.org> wrote:
> I have:
> 
> batik 1.7
> Java Plug-in 1.6.0_26
> Using JRE version 1.6.0_26-b03-383-11A511 Java HotSpot(TM) 64-Bit 
> Server VM Chrome/Safari
> 
> Trying to load the following SVG using JSVGCanvas and it displays the "broken 
> image".  I note that the SVG is an embedded PNG whereas the others I can 
> successfully load are native SVG.
> 
> http://www.renci.org/~kgamiel/web/gauge/img/Tick1.svg
> 
> Any guidance appreciated!
> 
> Kevin
> 
> --
> RENCI
> http://www.renci.org
> Proud charter member of Tar Heel Information Services - "Nothing but Net!"
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: 
> batik-users-h...@xmlgraphics.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org


---------------------------------------------------------------------
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