Out of Memory Error. Please help this newbie
in
Programming Questions
•
19 days ago
Hi,
I'm having problems with some basic code. It is to take a screenshot image and display it. The underlying image (screen.png) will be updated every minute or so, and I want it to be displayed using processing.
Only problem is my code causes out of memory errors. Here is my code:
PImage gatewayImage;
PImage screenImage;
PImage fingerImage;
void setup() {
size(1440, 960);
frame.setLocation(0, 0);
frameRate(30);
smooth();
background(0);
// Images must be in the "data" directory to load correctly
gatewayImage = loadImage("gateway.png");
}
void draw() {
background(255);
screenImage = loadImage("screen.png");
image(gatewayImage, 0, -35, 1130*0.85, 1839*0.85);
image(screenImage, 155, 141, 640, 480);
}
Can you please point me in the right direction. I think this code used to work a long time ago. I have tried upping the available memory to 256MB.
Thanks in Advance,
Jon
1