How to memory allocation and large bitmaps?

Hi,

First post here. I am trying to produce images using R (for fun), and am running into an issue for particularly large images, in this case I am trying to produce a bitmap that is ~30000x~30000 px, the code is,

bmp("test.bmp", 31344, 31344)
image(z = my_matrix)
dev.off()

The first line of this code produces the error, the bmp() function,

Error in bmp("test.bmp", 31344, 31344) :
unable to start bmp() device
In addition: Warning messages:
1: In bmp("test.bmp", 31344, 31344) :
unable to allocate bitmap
2: In bmp("test.bmp", 31344, 31344) : opening device failed

I am fairly sure this is simply a memory capacity issue as I can open a bitmap of size,

bmp("test.bmp", 20000, 20000)

Which does not create an error. I have already messed around with my memory limit, using memory.limit(), and am running x64 R on x64 Windows so my memory capacity is,

memory.limit()
[1] 1.759219e+13

Which is huge, my physical RAM capacity is 12Gb. Does anyone have a way I can get R to create this slightly larger bitmap?

Thanks

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.