Re: Broken image, embedded PNG
Kevin Gamiel <[email protected]>
| Newsgroups | gmane.text.xml.batik.user |
|---|---|
| Message-ID | <[email protected]> |
Still having this problem and just confirmed that it works on linux with OpenJDK 1.6.0_20, but fails on Mac OS Lion with "1.6.0_29". The problem definitely seems to be on some embedded PNGs. Here is the file that fails, I'm still using the source code listed earlier in this thread. In this case, one of the embedded PNGs is rendered as "broken", the rest looks ok. I've included a screen capture of that section. It displays fine in a browser. Any suggestions on how to debug beyond hacking batik source appreciated, that will be my last resort. http://www.renci.org/~kgamiel/web/gauge/img/waveresearch_background.svg [cid:31198D5C-98FF-494A-8405-63B99BCE6E7A] -- RENCI http://www.renci.org On Nov 2, 2011, at 10:18 AM, Kerschbaum Michael wrote: Hallo, On Win7 it works ?! If you have the source Code of batik you could debug it ?! There are no errors written to console or std.err ! No logging, as long as i can see in the batik code…. Someone who knows the code better may know where the default image is used. With this information it is possible to find the code where the default image is used, and why it is used ! <image001.png> mfg Klaus Düller – Vorsitzender des Aufsichtsrates Von: Kevin Gamiel [mailto:[email protected]] Gesendet: Mittwoch, 02. November 2011 13:49 An: <[email protected]<mailto:[email protected]>> Betreff: Re: Broken image, embedded PNG 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 <image002.png> -- 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]> 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 2012-01-04 at 11.30.23 AM.png
(image/png, 381.5 KB) - not displayed