Hi Hago, "Hago Ziegler" <[EMAIL PROTECTED]> wrote on 11/02/2008 06:53:38 PM:
> >> The resulting png is exactly the same when I put --dpi 100 or -dpi 96. > > Inside the svg-file the size is defined in pixel values (744 x 700). Well DPI stands for 'Dots Per Inch' meaning 'Pixels Per Inch'. Since you give the output size of the document in pixels already there is no sensible way to apply the dpi flag to your pixels to map them to pixel units (since they are already pixel units) If you had used width="744pt" height="700pt" then we would use -dpi to map Pt (points or 1/72nd of an inch) to pixels. > No viewBox. This is essentially always the wrong thing to do (see below). > Since I read that the default dpi-value of the batik rasterizer is 96dpi, > I expected a png-image with about 2240 x 2100 px when I set the dpi to 300. In the above case since the dpi flag is only used to map real world units to userspace (or 'px' units). Even if you added 'pt' to your width/height specification the result would be to make the width and height much larger, but since there is no view box it would render the original content at the same size with a lot of blank space to the right and bottom. The ViewBox establishes what part of the canvas should be mapped to the actually rendered output region. If you had a viewBox then you could either use 'pt' on the width and height to get the effect you want, or you could specify the width and height you wanted. Otherwise your content is 'locked' into rendering 1:1 with pixels unless you somehow manually insert a transform in the rendering.
