michael watson (IAH-C)
2004-Dec-20 13:46 UTC
[R] Memory problem with jpeg() and wide jpegs
Hi I have been creating very, very long jpeg images for the last two weeks using jpeg(). All of a sudden, and I mean that, it's stopped working - I've not changed a thing! The error message I get is:> jpeg("out.jpg",width=50000,height=480, quality=100)Error in devga(paste("jpeg:", quality, ":", filename, sep = ""), width, : unable to start device devga In addition: Warning message: Unable to allocate bitmap I have plenty of disk space in the place I want to create the jpeg, and if I reduce it from "width=50000" to "width=5000", then it works no problem, which suggests it is a memory problem. If I close R and re-open R the problem does not go away. And as I said above, I have been using this code for weeks with no problem, then I change nothing, and start getting this error message. I'm running R 2.0.1 on Windows XP. I'm going to restart Windows and see if that helps, but if re-starting windows does help, is there an explanation as to where all the memory R used to be able to get at disappeared to in the current session? Cheers Mick
michael watson (IAH-C) wrote:> Hi > > I have been creating very, very long jpeg images for the last two weeks > using jpeg(). All of a sudden, and I mean that, it's stopped working - > I've not changed a thing! The error message I get is: > > >>jpeg("out.jpg",width=50000,height=480, quality=100) > > Error in devga(paste("jpeg:", quality, ":", filename, sep = ""), width, > : > unable to start device devga > In addition: Warning message: > Unable to allocate bitmap > > I have plenty of disk space in the place I want to create the jpeg, and > if I reduce it from "width=50000" to "width=5000", then it works no > problem, which suggests it is a memory problem. If I close R and > re-open R the problem does not go away. And as I said above, I have > been using this code for weeks with no problem, then I change nothing, > and start getting this error message.I don't believe it has worked. Such a huge one does not work for me even on a rather big machine. If it had worked: On the same platform, OS, R version? I think you have to contribute a patch in order to get such a huge jpeg. Uwe Ligges> I'm running R 2.0.1 on Windows XP. I'm going to restart Windows and see > if that helps, but if re-starting windows does help, is there an > explanation as to where all the memory R used to be able to get at > disappeared to in the current session?>> Cheers > Mick > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
michael watson (IAH-C)
2004-Dec-20 16:16 UTC
[R] Memory problem with jpeg() and wide jpegs
Uwe, I had to smile at your comments - the code works on my 512Mb laptop.... -----Original Message----- From: Uwe Ligges [mailto:ligges at statistik.uni-dortmund.de] Sent: Mon 12/20/2004 2:23 PM To: michael watson (IAH-C) Cc: R-help at stat.math.ethz.ch Subject: Re: [R] Memory problem with jpeg() and wide jpegs michael watson (IAH-C) wrote:> Hi > > I have been creating very, very long jpeg images for the last two weeks > using jpeg(). All of a sudden, and I mean that, it's stopped working - > I've not changed a thing! The error message I get is: > > >>jpeg("out.jpg",width=50000,height=480, quality=100) > > Error in devga(paste("jpeg:", quality, ":", filename, sep = ""), width, > : > unable to start device devga > In addition: Warning message: > Unable to allocate bitmap > > I have plenty of disk space in the place I want to create the jpeg, and > if I reduce it from "width=50000" to "width=5000", then it works no > problem, which suggests it is a memory problem. If I close R and > re-open R the problem does not go away. And as I said above, I have > been using this code for weeks with no problem, then I change nothing, > and start getting this error message.I don't believe it has worked. Such a huge one does not work for me even on a rather big machine. If it had worked: On the same platform, OS, R version? I think you have to contribute a patch in order to get such a huge jpeg. Uwe Ligges> I'm running R 2.0.1 on Windows XP. I'm going to restart Windows and see > if that helps, but if re-starting windows does help, is there an > explanation as to where all the memory R used to be able to get at > disappeared to in the current session?>> Cheers > Mick > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
michael watson (IAH-C)
2004-Dec-20 21:14 UTC
[R] Memory problem with jpeg() and wide jpegs
Surprisingly, Internet Explorer (which due to it's browser dominance will be the main, but not sole, purveyor of the images I create) loads this image up in a few seconds and allows the user to scroll along it very nicely. The image is really for demonstration purposes only, and many people who use the package I am writing (if there are any) will create much smaller images of the object in question. However, I like the fact that R can draw a whole genome in about 10 seconds, don't you? ;-) Mick -----Original Message----- From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] Sent: Mon 12/20/2004 5:37 PM To: Uwe Ligges Cc: michael watson (IAH-C); R-help at stat.math.ethz.ch Subject: Re: [R] Memory problem with jpeg() and wide jpegs It is also several times greater than the limit of human perception, being several feet long at printing resolutions that need a magnifying glass to see. This is Windows and the limit is in the graphics card: mine is able to do this but I suspect you need a 128Mb card (that jpeg is of itself about 90Mb). However, most viewers (including PhotoShop) will barf on such a large jpeg. On Mon, 20 Dec 2004, Uwe Ligges wrote:> michael watson (IAH-C) wrote: > >> Hi >> >> I have been creating very, very long jpeg images for the last two weeks >> using jpeg(). All of a sudden, and I mean that, it's stopped working - >> I've not changed a thing! The error message I get is: >> >> >>> jpeg("out.jpg",width=50000,height=480, quality=100) >> >> Error in devga(paste("jpeg:", quality, ":", filename, sep = ""), width, >> : unable to start device devga >> In addition: Warning message: Unable to allocate bitmap >> I have plenty of disk space in the place I want to create the jpeg, and >> if I reduce it from "width=50000" to "width=5000", then it works no >> problem, which suggests it is a memory problem. If I close R and >> re-open R the problem does not go away. And as I said above, I have >> been using this code for weeks with no problem, then I change nothing, >> and start getting this error message. > > I don't believe it has worked. Such a huge one does not work for me even on a > rather big machine. > If it had worked: On the same platform, OS, R version? > I think you have to contribute a patch in order to get such a huge jpeg. > > Uwe Ligges > > >> I'm running R 2.0.1 on Windows XP. I'm going to restart Windows and see >> if that helps, but if re-starting windows does help, is there an >> explanation as to where all the memory R used to be able to get at >> disappeared to in the current session? >> >> Cheers >> Mick >> >> ______________________________________________ >> R-help at stat.math.ethz.ch mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide! >> http://www.R-project.org/posting-guide.html > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595