Re: [Rd] problem with png() and large dimensions on some 32-bit Windows machines

From: Dan Tenenbaum <dtenenba_at_fhcrc.org>
Date: Tue, 29 Mar 2011 18:58:54 -0700

I forgot to mention, on the machine where the png() command below does not work, the output of capabilities() is:
> capabilities()

    jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets
    TRUE     TRUE     TRUE     TRUE    FALSE    FALSE     TRUE     TRUE
  libxml     fifo   cledit    iconv      NLS  profmem    cairo
    TRUE    FALSE     TRUE     TRUE     TRUE     TRUE    FALSE

Also, I checked to make sure that tempfile() returns something writable, and that does not seem to be the issue.

> t <- tempfile()
> png(file=t)
> png(file=t, width=1165, height=12983)
Error in png(file = t, width = 1165, height = 12983) :   unable to start png() device
In addition: Warning messages:
1: In png(file = t, width = 1165, height = 12983) :   Unable to allocate bitmap
2: In png(file = t, width = 1165, height = 12983) : opening device failed

In fact, to narrow it down some more, it works if I specify either height or width but not both.

Thanks
Dan

On Tue, Mar 29, 2011 at 6:10 PM, Dan Tenenbaum <dtenenba_at_fhcrc.org> wrote:

> Hello,
>
> I encountered this:
>
> > png(file=tempfile(), width=1165, height=12983)
> Error in png(file = tempfile(), width = 1165, height = 12983) :
> unable to start png() device
> In addition: Warning messages:
> 1: In png(file = tempfile(), width = 1165, height = 12983) :
> Unable to allocate bitmap
> 2: In png(file = tempfile(), width = 1165, height = 12983) :
> opening device failed
> >
>
> On the following system:
> > sessionInfo()
> R version 2.13.0 alpha (2011-03-18 r54865)
> Platform: i386-pc-mingw32/i386 (32-bit)
>
> locale:
> [1] LC_COLLATE=English_United States.1252
> [2] LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252
> [4] LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> This is a Windows Server 2003 R2 Enterprise Edition Service Pack 2 system
> with 3GB of RAM.
>
> On another system, the command works fine. Info from that system:
>
> > sessionInfo()
> R version 2.13.0 alpha (2011-03-27 r55091)
> Platform: i386-pc-mingw32/i386 (32-bit)
>
> locale:
> [1] LC_COLLATE=English_United States.1252
> [2] LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252
> [4] LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
> Windows Server 2008 R2 Enterprise with 4GB of RAM.
>
> The command also worked fine on a system with only 2GB of RAM, but I don't
> have further information about that system at the moment. It suggests though
> that the amount of RAM is not the sole factor involved.
>
> Sorry this may not be the most reproducible problem, but I hope this is
> useful nonetheless.
> Dan
>
>
>
>

        [[alternative HTML version deleted]]



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 30 Mar 2011 - 02:02:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 30 Mar 2011 - 04:40:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive