thanks for all suggestions, works perfectly.
Cameron McCormack-4 wrote: > > > OK. You can use the ParsedURL class to get an InputStream from that > data: URI: > > > http://xmlgraphics.apache.org/batik/javadoc/org/apache/batik/util/ParsedURL.html > > You can then pass that InputStream to the constructor of > org.apache.batik.ext.awt.image.codec.png.PNGImageDecoder, then call > decodeAsRenderedImage(0) on it PNGImageDecoder. That will return you a > RenderedImage: > > > http://java.sun.com/j2se/1.5.0/docs/api/java/awt/image/RenderedImage.html > > Then you can convert the RenderedImage to a BufferedImage, using code > like shown here: > > http://www.jguru.com/faq/view.jsp?EID=114602 > > Once you’ve made the changes to your image, use the PNGImageEncoder > class, which will write the PNG data to an OutputStream. For that > OutputStream, supply an instance of Base64EncoderStream that is wrapped > by a StringWriter. Then set the @xlink:href attribute of the <image> > element to be "data:image/png;base64," + yourStringWriter. > > Hope that helps, > > Cameron > > -- > Cameron McCormack ≝ http://mcc.id.au/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/how-to-export-alter-images%28image-data%29-of-an-svg-file-tp19794886p19899814.html Sent from the Batik - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]