xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davis-5 <t...@robertjdavis.co.uk>
Subject PNG pixel dimensions of given dpi don't correspond to original SVG mm dimensions
Date Tue, 13 May 2008 16:08:07 GMT


I have a svg file with size 100mm x 70mm

I want to render it as a png at 300 dpi

So, 100mm = 100 / 25.4 = 3.93 inches (to nearest 2 decimal places), so i
would expect the width to be 1181 pixels
and, 70mm = 70 / 25.4 = 2.76 inches (to nearest 2 decimal places), so i
would expect the height to be 826 pixels

BUT instead the value is 3508 x 2480 pixels

WHY is this?

I'm using the following

    double millimetresPerPixel = (25.4f / dpi);    

t.addTranscodingHint(ImageTranscoder.KEY_PIXEL_UNIT_TO_MILLIMETER, new
Float(millimetresPerPixel));
    
    

Please advise -thanks in advance

-- 
View this message in context: http://www.nabble.com/PNG-pixel-dimensions-of-given-dpi-don%27t-correspond-to-original-SVG-mm-dimensions-tp17212289p17212289.html
Sent from the Batik - Users mailing list archive at Nabble.com.


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


Mime
View raw message