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 Christophe Le Bot <cl...@agencecap.net> on 2003/03/04 13:19:17 UTC

Rasterizer and resolution

Hello,

Batik-Rasterizer (v 1.5 beta 3) seems to have troubles to convert a SVG 
file to a raster format when using dpi option.


Here my SVG test file :
<svg width="40mm" height="40mm" xmlns="http://www.w3.org/2000/svg">
	<rect x="1mm" y="1mm" width="38mm" height="38mm" fill="none" 
stroke="blue" stroke-width="1mm" />
	<text x="10mm" y="8mm" fill="black" stroke="none" 
font-size="12pt">Tests</text>
</svg>


Here my test results (the generated images are tested with Photoshop):

1. SVG to PNG
All is right, the resolution is the same as in command line and the size 
too.

2. SVG to Jpeg
The resolution is always 72 dpi, the size (in pixels) is good. The 
resolution must be changed in another tool (Photoshop for example) to 
get the good size (in mm).

3. SVG to Tiff
The resolution is bad (ie, 236 dpi instead of 300 dpi), the size (in 
pixels) is good. The resolution must be changed in another tool 
(Photoshop for example) to get the good size (in mm).

4. SVG to PDF (with FOP)
The size of the generated document is bad (ie, 53.3mm instead of 40mm).
This corresponds to the ratio between 96 dpi and 72 dpi. But I don't 
know why...


Can you explain to me these strange behaviors ?

Thanks

Christophe.


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