**Hi Gurus, Masters and kindhearted people,
I am using OpenFrameWorks to play PNG sequence (about 480 images) for an animation loop. I am facing an interesting problem here: it runs properly if each image is small (under around 600X400 pixels);
However, if each image is bigger than (approximate bigger 600X400 pixels - no matter how small the size, even its only 50K each image). OF only be able to run 256 images of it. If I set OF to run whole sequence 480 images it keep collapsing.
Here is the relevant code:**
void testApp::setup() {
ofDirectory dir;
int nFiles = dir.listDir(“plops”);
if(nFiles) {
for(int i=0; i<dir.numFiles(); i++) {
// add the image to the vector
string filePath = dir.getPath(i);
images.push_back(ofImage());
images.back().loadImage(filePath);
}
}
void testApp::draw() {
ofBackground (253,207,162);
// this is the total time of the animation based on fps
float totalTime = images.size() / sequenceFPS;
int frameIndex = 0;
if(bFrameIndependent) {
// calculate the frame index based on the app time
// and the desired sequence fps. then mod to wrap
frameIndex = (int)(ofGetElapsedTimef() * sequenceFPS) % images.size();
}
else {
// set the frame index based on the app frame
// count. then mod to wrap.
frameIndex = ofGetFrameNum() % images.size();
}
// draw the image sequence at the new frame count (background color + position for animated character)
ofSetColor(253,207,162);
images[frameIndex].draw(0, 90);
}
**How can I solve this problem?
Is that because of the hexadecimal system? As 256 looks relevant.
Should I enlarge the vector size, if so how should I do it?
Thank you so much ?**