OutOfMemoryError even though at each frame there is only 1 Image-file involved
in
Programming Questions
•
11 months ago
Hi,
I have a program, that loads several 100s of Images from the web and saves them on my computer. There is only one PImage variable involved which loads one picture after the other, so there shouldn't be a memory issue, because the old image should just be overwritten by the new one, right?
It worked fine with the last versions of processing but on my new computer with processing 2.0, i suddenly get OutOfMemoryErrors after about 80 images or so. Is there a way to fix this. Are the old images somehow blocking the memory, and if so why is that and can they be erased?
I don't think a code-extract is needed here. Because i simply work with loadImage(*url*). no fancy stuff here.
Okay here is a simplified version of what i'm doing (btw. I checked again, in processing 1.5 it works perfectly fine):
I have a program, that loads several 100s of Images from the web and saves them on my computer. There is only one PImage variable involved which loads one picture after the other, so there shouldn't be a memory issue, because the old image should just be overwritten by the new one, right?
It worked fine with the last versions of processing but on my new computer with processing 2.0, i suddenly get OutOfMemoryErrors after about 80 images or so. Is there a way to fix this. Are the old images somehow blocking the memory, and if so why is that and can they be erased?
I don't think a code-extract is needed here. Because i simply work with loadImage(*url*). no fancy stuff here.
Okay here is a simplified version of what i'm doing (btw. I checked again, in processing 1.5 it works perfectly fine):
- PImage online;
- int i=0;
- void setup(){
- size(2000,3000);
- }
- void draw(){
- online=loadImage(url_base+i+".jpg");
- i+=1;
- image(online,0,0);
- saveFrame(save_name+".jpg");
- }
1