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 Re: SOLVED Re: PNG pixel dimensions of given dpi don't correspond to original SVG mm dimensions
Date Wed, 14 May 2008 12:55:10 GMT



thomas.deweese wrote:
> 
> 
> 
>     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.  
> 
> 

I'm viewing the PNG properties via Windows Explorer - which just shows the
integer part - 299.

If I view the file in GIMP the properties show more decimal places - much
like your math.

I'd like to be able to change this to 300 dpi. 

Can I get the byte array/stream of the PNG from the transcoder, before it is
written to the file?

Using the PNG standards, I should be able to locate the dpi field and
overwrite it.

While I am there, I'll also want to adjust the indexed colors - the image is
black and white BUT 'black' is not totally black, i.e. the RGB values aren't
00,00,00 yet the original SVG uses the term 'black'.

Another way would be to get the PNGTranscoder to give me some sort of
interface from the JAI (Java Advanced Imaging) so that I could access the
PNG fields that way.

Any thoughts let me know.

I'll let you know what I end up doing.

Thanks for all your replies.


-- 
View this message in context: http://www.nabble.com/PNG-pixel-dimensions-of-given-dpi-don%27t-correspond-to-original-SVG-mm-dimensions-tp17212289p17230398.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