xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: 96dpi or 300dpi - no difference
Date Mon, 03 Nov 2008 11:16:08 GMT
Hi Hago,

"Hago Ziegler" <h@hzbb.de> wrote on 11/02/2008 06:53:38 PM:

> >> The resulting png is exactly the same when I put --dpi 100 or -dpi 
> 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 
give the output size of the document in pixels already there is no 
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 
> I expected a png-image with about 2240 x 2100 px when I set the dpi to 

   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 
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 
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 
you wanted.  Otherwise your content is 'locked' into rendering 1:1 with 
unless you somehow manually insert a transform in the rendering.

View raw message