I have tried to create an image Element in batik to display a jpeg file. But
it does not work.
This is my code.
String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
.......
Element abc = document.createElementNS(svgNS, "image");
abc.setAttributeNS(null, "x", "10");
abc.setAttributeNS(null, "y", "10");
abc.setAttributeNS(null, "width", "300");
abc.setAttributeNS(null, "height", "300");
abc.setAttributeNS(XMLConstants.XLINK_NAMESPACE_URI, "xlink:href", "
picture.jpg");
..........
The error given is an I/O error occured while processing the URI
Can someone please advice me on this?? Or is there any other methods to
display a jpeg file inside batik SVGDocument. Thanks alot!!!!
|