xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: SOLVED Re: PNG pixel dimensions of given dpi don't correspond to original SVG mm dimensions
Date Wed, 14 May 2008 11:52:22 GMT
Hi Rob,

Rob Davis-5 <tech@robertjdavis.co.uk> wrote on 05/14/2008 06:37:14 AM:

> However another slight problem is that the dpi in the PNG is 299. I 
guess
> there is some rounding in the maths when the PNGTranscoder renders the 
PNG.
> So I could manually set PNG to 300dpi but any way to force the 
PNGTranscoder
> to insert a certain value for the dpi?

    Well if I reproduce the math involved I get that the PNG should 
contain:
11811 pixels/meter which converts to 299.9994 pixels/inch.  If your 
software reports
that as 299 then that software is (IMHO) broken.  That said you can always 
lie on
the input side so to get 11812 pixels/meter (i.e. 300.025 dpi) in the PNG 
file , to do that 
you should claim that your PIXEL_UNIT_TO_MILLIMETER is 1000/11812 or 
'0.08466'.

Mime
View raw message