Load gigabytes of jpgs

Greetings,

I have about 2.5 gigabytes of JPGs that I want to load into memory using ofImage (yes it is thousands of them). Why is that when I try to do this, my app’s memory usage shoots up to 30 gigabytes and my whole computer freezes. My computer has 16 gigs of memory.

Is there a way I can not load them onto the GPU and keep them on the CPU for starters?

Thanks!

Ted

hello @tedmoore greetings!
After jpg decompression the image size will be similar to an uncompressed tiff if you want to know how many files you can load in RAM before using.
And your limit is less than 16gb because of the operational system
If you share the motivation behind loading 30Gb of images in RAM, people can suggest alternatives for your goal.

2 Likes

Thanks @dimitre,

I have a few videos that are rendered as jpg sequences that I want to be able to skip around in by sending receiving osc messages in oF indicating what frame to show (the audio is happening in SuperCollider, and sending frame numbers over to oF). I think next I’m going to look at encoding the videos as hap (without audio, again that’s in SuperCollider) and seeing if it can jump around frames fast enough for me.

Any other suggestions are very welcome!

Thanks,

Ted

2 Likes

Nice, ofxHapPlayer is great for random access for my usage. better yet you dont’ need audio there, it actually has a thread issue when you use videos with audio (happens when unloading video to load another or exit the program)

3 Likes