xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prabhakar Lal" <Prabhakar_...@mindtree.com>
Subject Problem with conversion from raster to svg using batik
Date Fri, 16 Jan 2004 10:49:37 GMT

Hi All,
Help Required.

Problem Description :

I am trying to convert a png image to svg format using batik API.
If I do not use any ImageHandler in the java code, the image is encoded as
base64 and dumped into the converted svg file.

<image x="20" y="20" width="100"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAACWCAYAAAAouC1
GAAASlklEQVR42u2dCVhU
R7bH/03fFtB2QRQBl7hrFNAX8PmSMW5J1Gg0MXkQSYxCxmBEI4kYRcXlqVGRiUad
GMGME2dcQNTEGIg6jluS+UYF9zyROE5c4gquiMjWc251dXNpuptFlm66zvcVfbu4
t251/eqcU1X3VpVKd3WLLm3nXviHhaGuS3xavM3n0clwkBYfz0JdljD/MBZsWST5
j//wF6EEw+LqsMYYoNiixkimEQY4jgTGluBIlv7hSGBsSWuksk4QYGrJqZcHjBzq
uuOv7QaAVNELzEERDYBaBGLaKlOas7oMqKbASFWRiDVAdQ1OdYORqiNRc/2augao
usBI1Z3xuq49VQ1GqukfYEl77B1OVYGRavNHmMIRGlOBfkhNwKlLfZzK9mNsBkhd
fQRQUTBOquGBkIMQ2wAj6VL1B6qAYii6nUmiBGvJx6jgr9MxCEYwqBUwjvLU0lRM
wUiGQjdoiAFMTWqNo8IwaIwSimRa.......
......
</image>

When I use a image handler such as ImageHandlerPNGEncoder it creates an SVG
file which has link to a png image which is created in the folder which I
specify.
<!-- extract of svg --->

<image x="20" y="20" width="100"
xlink:href="file:/F:/WTK20/res/images//pngImage13.png" height="150"
preserveAspectRatio="none" />

In both the cases, I am getting an image tag in the SVG file.
My requirement is to display the svg using batik API in the format given
below: 
<!-- Sample
http://luxor-xul.sourceforge.net/talk/jug-nov-2002/slides.html#svg-25-->
<svg>
 <g style="fill:#c1c1bf;">
   <path d="M 329.336 727.552 
            C 315.224 726.328 304.136 715.816 303.128 694.936 
            C 306.368 639.496 309.608 582.112 271.232 545.104 
	    C 265.256 499.024 244.016 482.104 234.008 452.512 
	    L 218.24 441.208 
	    L 237.104 411.688 
	    L 245.168 411.904 
	    L 323.936 571.168 
	    L 340.424 651.448 
	    L 329.336 727.552 
	    z" />
 </g>        
 
How can I achieve the same using batik API? 

Thanks in advance.

Prabhakar Lal


DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. Before opening
attachments please check them for viruses and defects. MindTree Consulting Private Limited
(MindTree) will not be responsible for any viruses or defects or any forwarded attachments
emanating either from within MindTree or outside. If you have received this message by mistake
please notify the sender by return  e-mail and delete this message from your system. Any unauthorized
use or dissemination of this message in whole or in part is strictly prohibited.  Please note
that e-mails are susceptible to change and MindTree shall not be liable for any improper,
untimely or incomplete transmission.

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


Mime
View raw message