[R-SIG-Mac] png resolution and size "error"?

Nicholas Crookston ncrookston.fs at gmail.com
Fri Jul 26 17:48:19 CEST 2013

Maybe this is just my MAC, maybe it is a bug! Advice would be helpful.

I'm having problems with device png() on MAC OS X, session info
is below.

In the example below, the reported image dpi is 72 and size is 1200x1200.
The image dpi should be 600 and size 2x2 inches (1200x1200 pixels with dpi
at 600).

When I run the same case on Fedora, I get image attributes I expect.
I believe this is also the case on Windows, but I don't have a
windows machine today for testing.

This important for "pasting" the images into a document. When the image is
dropped onto Word (tested on MAC) or LibreOffice Writer (tested on Fedora)
documents, the height and width are correct when I build the image from
Fedora and incorrect using the MAC version.

I would be happy to send the images produced on MAC and Fedora
upon request.

I got similar results using device tiff() in that the resolution
and size information as created on my MAC were not as I expected.

Here is an example from MAC:


sessionInfo()  #from my MAC.

R version 3.0.1 (2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_3.0.1

Corresponding sessionInfo() from Fedora.
R version 3.0.1 (2013-05-16)
Platform: x86_64-redhat-linux-gnu (64-bit)

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [7] LC_PAPER=C                 LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

More information about the R-SIG-Mac mailing list