xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Gamiel <kgam...@renci.org>
Subject Re: Broken image, embedded PNG
Date Wed, 02 Nov 2011 12:48:34 GMT
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:kgamiel@renci.org]
Gesendet: Dienstag, 01. November 2011 06:02
An: <batik-users@xmlgraphics.apache.org<mailto: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 <kgamiel@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-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail:
batik-users-help@xmlgraphics.apache.org




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


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



Mime
View raw message