By their very nature, files are slow, if you need a fast system, you should keep information that is frequently accessed in RAM.
I would some sort of static data structure, then just keep pushing and popping pointers to your image objects. Just make sure you delete the popped object(s) after you are done with them to prevent leaks.
Fbody
Posting Maven
2,930 posts since Oct 2009
Reputation Points: 833
Solved Threads: 393