Hello all, a friend has a problem with tiff() which I was unable to help about. I searched the error messages to no avail. When he tries: tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = 5, height = 5, units = "cm", bg = "white", res = 1200) Error in tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = 5, : unable to start device In addition: Warning messages: 1: In tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = 5, : Unable to allocate bitmap 2: In tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = 5, : opening device failed Same for tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = 20, height = 20, units = "cm", bg = "white", res = 300) Error in tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = 5, : unable to start device In addition: Warning messages: 1: In tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = 5, : Unable to allocate bitmap 2: In tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = 5, : opening device failed This second example runs on my Mac (I did not try the first), so we are at loss why windows would not run the very same code. Any ideas? I can see that setting the resolution very high (as for the forst example) might not work, but the *windows only* failure of the second example is strange. I suspect cairo *could* be an issue, but that's as far as I can guess on sobody else's intallation. Best, Federico -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com
On 17 Jun 2009, at 18:15, Dirk Eddelbuettel wrote:> On Wed, Jun 17, 2009 at 05:29:26PM +0100, Federico Calboli wrote: >> Hello all, >> >> a friend has a problem with tiff() which I was unable to help >> about. I >> searched the error messages to no avail. When he tries: >> >> tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = 5, >> height >> 5, units = "cm", bg = "white", res = 1200) >> Error in tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = >> 5, : >> unable to start device >> In addition: Warning messages: >> 1: In tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = >> 5, : >> Unable to allocate bitmap >> 2: In tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = >> 5, : >> opening device failed >> >> Same for >> >> tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = 20, >> height >> 20, units = "cm", bg = "white", res = 300) >> Error in tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = >> 5, : >> unable to start device >> In addition: Warning messages: >> 1: In tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = >> 5, : >> Unable to allocate bitmap >> 2: In tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = >> 5, : >> opening device failed >> >> This second example runs on my Mac (I did not try the first), so we >> are >> at loss why windows would not run the very same code. Any ideas? I >> can >> see that setting the resolution very high (as for the forst example) >> might not work, but the *windows only* failure of the second >> example is >> strange. I suspect cairo *could* be an issue, but that's as far as >> I can >> guess on sobody else's intallation. > > Does capabilities("tiff") return TRUE ?I checked on the affected computer and both tiff and cairo capabiliies return FALSE. How that is I would not know, it's a bog standard R installation on windows XP. F -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com
>> I checked on the affected computer and both tiff and cairo >> capabiliies >> return FALSE. How that is I would not know, it's a bog standard R >> installation on windows XP. > The 2.9.0 Windows install does not have TIFF capability. Try png() or > something else.I don't know about that, but R is definitively spitting out a 10x10cm 300dpi tiff without issues. It's when a bigger/higher dpi image is required that it bails out. I'm also told that jpeg() does not work on that specific machine. F -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com
>> -------- Original Message -------- >> Subject: Re: [R] tiff() woes >> Date: Thu, 18 Jun 2009 12:38:39 +0100 >> From: Federico Calboli <f.calboli at imperial.ac.uk> >> To: Allan Engelhardt <allane at cybaea.com>, r-help at r-project.org >> CC: James Grellier <j.grellier at imperial.ac.uk> >> References: <BCEA3AB8-CC85-42A0-98E1-5FD0525C3C06 at imperial.ac.uk> >> <20090617171512.GA13612 at eddelbuettel.com> >> <83D6A539-69FD-43AE-9255-DB4E7EA72030 at imperial.ac.uk> >> <4A3A1811.5090201 at cybaea.com> >> >> >>>> I checked on the affected computer and both tiff and cairo capabiliies >>>> return FALSE. How that is I would not know, it's a bog standard R >>>> installation on windows XP. >>>> >>> The 2.9.0 Windows install does not have TIFF capability. Try png() or >>> something else.Well, actually it does have tiff capabilities [although it does not report so, hence the latter may be a bug]. Uwe Ligges>> I don't know about that, but R is definitively spitting out a 10x10cm >> 300dpi tiff without issues. It's when a bigger/higher dpi image is >> required that it bails out. I'm also told that jpeg() does not work on >> that specific machine. >> >> F >> >> >> -- >> Federico C. F. Calboli >> Department of Epidemiology and Public Health >> Imperial College, St. Mary's Campus >> Norfolk Place, London W2 1PG >> >> Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 >> >> f.calboli [.a.t] imperial.ac.uk >> f.calboli [.a.t] gmail.com >> >> ______________________________________________ >> R-help at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> >