Re: Broken image, embedded PNG
Kevin Gamiel <[email protected]>
| Newsgroups | gmane.text.xml.batik.user |
|---|---|
| Message-ID | <[email protected]> |
It's a tiny file, no errors on the console, my web browser can display it just fine. I'm on a Mac, should that matter, running OS X Lion. Is there debugging I could enable for batik? I assume the broken image icon is originating from batik so maybe it could tell us where it's failing(?) See attached for image I see. Kevin [cid:4A93E40A-DE17-4FAE-ABFB-6B722255FAB5] -- RENCI http://www.renci.org Proud charter member of Tar Heel Information Services - "Nothing but Net!" On Nov 2, 2011, at 3:45 AM, Kerschbaum Michael wrote: Hello, Have you checked some other stuff. Read permission, enough memory (VM Settings, -Xms, -Xmx) ? Mfg -----Ursprüngliche Nachricht----- Von: Kevin Gamiel [mailto:[email protected]] Gesendet: Dienstag, 01. November 2011 06:02 An: <[email protected]<mailto:[email protected]>> 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 <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Screen Shot 2011-11-02 at 8.47.49 AM.png
(image/png, 38.7 KB) - not displayed