From wdunlap at tibco.com  Fri Feb 10 18:32:45 2017
From: wdunlap at tibco.com (William Dunlap)
Date: Fri, 10 Feb 2017 09:32:45 -0800
Subject: [Rd] Grapics Device Resolution Limits
In-Reply-To: <MWHPR01MB27011180C046283EE5E82B44CD440@MWHPR01MB2701.prod.exchangelabs.com>
References: <MWHPR01MB27011180C046283EE5E82B44CD440@MWHPR01MB2701.prod.exchangelabs.com>
Message-ID: <CAF8bMcbtSejvF+HKcHzSW8AkuYKPjNwDodGB-eQXsB0AM3bN7A@mail.gmail.com>

Were you suppressing warnings?  I get a warning along with the "unable
to start device 'png'" in some cases where it fails.  E.g., on Linux

> png("Figure1A.png", h = 7, w = 7, res = 1e5, units = "cm")
Error in png("Figure1A.png", h = 7, w = 7, res = 1e+05, units = "cm") :
  unable to start device 'png'
In addition: Warning message:
In png("Figure1A.png", h = 7, w = 7, res = 1e+05, units = "cm") :
  cairo error 'invalid value (typically too big) for the size of the
input (surface, pattern, etc.)'

or on Windows

> png("Figure1A.png", h = 7, w = 7, res = 100000, units = "cm")
Error in png("Figure1A.png", h = 7, w = 7, res = 1e+05, units = "cm") :
  unable to start png() device
In addition: Warning messages:
1: In png("Figure1A.png", h = 7, w = 7, res = 1e+05, units = "cm") :
  unable to allocate bitmap
2: In png("Figure1A.png", h = 7, w = 7, res = 1e+05, units = "cm") :
  opening device failed

or when the current directory is not writable (or does not exist)

> png("Figure1A.png", h = 7, w = 7, res = 1000, units = "cm")
> plot(1:5)
Error in plot.new() : could not open file 'Figure1A.png'




Bill Dunlap
TIBCO Software
wdunlap tibco.com


On Thu, Feb 9, 2017 at 6:00 PM, Dario Strbenac
<dstr7320 at uni.sydney.edu.au> wrote:
> Good day,
>
> Could the documentation of graphics devices give some explanation of how big the bitmap limits are? For example,
>
>> png("Figure1A.png", h = 7, w = 7, res = 1000, units = "cm")
>
> Results in Error: unable to start png() device, but the help page of devices doesn't explain that there are any limits or how they are determined. The wording of the error message could also be improved, to explain that the resolution is too high or the dimensions are too large.
>
>> sessionInfo()
> R version 3.3.2 Patched (2017-02-07 r72138)
> Platform: i386-w64-mingw32/i386 (32-bit)
> Running under: Windows 7 (build 7601) Service Pack 1
>
> --------------------------------------
> Dario Strbenac
> University of Sydney
> Camperdown NSW 2050
> Australia
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Grapics Device Resolution Limits
William Dunlap