You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Ashish Kulkarni <ku...@yahoo.com> on 2003/06/19 01:14:38 UTC
create SVG file from BufferedImage
Hi,
Is there a way to create a SVG file from
bufferedImage,
can any one please provide some code
Ashish
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: create SVG file from BufferedImage
Posted by Thomas DeWeese <Th...@Kodak.com>.
Ashish Kulkarni wrote:
>Hi,
>Is there a way to create a SVG file from
>bufferedImage,
>can any one please provide some code
>
>
This can be done by essentially embedding the BufferedImage in the
SVG file as a JPEG or PNG. If you look at the SVGGraphics2D stuff
you can use this to fairly easily generate such an SVG file for you
(create an SVGGraphics2D instance and draw your BufferedImage
into it). There is some sample code on the Batik Web Site.
If you want to 'vectorize' the contents of the BufferedImage, so
generate a bunch of path elements for fills/strokes etc. Batik contains
no tools to do any such thing (this is in general an unsolved problem).
You could generate lots and lots of rectangles but generally this
is not much of a win :)
>Ashish
>
>
>__________________________________
>Do you Yahoo!?
>SBC Yahoo! DSL - Now only $29.95 per month!
>http://sbc.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: batik-users-help@xml.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org