I am trying to make an app which will display all the image files’ pictures in a scrolling window(of ofxImGui). The first problem was, it was very slow to load the pictures into ofImage objects.That problem partially got fixed using ofxThreadedImageLoader.
But now there is another problem and I am not sure how I can fix it.
If the selected directory using the app has high resolution pictures(for example: photos taken by a not very old Android phone) , it is able to load and display 20 image files, but if I try to display for example 40 image files, then the screen of my Android phone goes black blank, but if Ithe directory has low-resolution images, , then it can load and display more than 40 image files without problem.So I think I am hitting a limit of ram.
Even if I can somehow optimize memory usage of the app, it would not be able to solve the problem because the directory of the image files (which is selected using the app) may have more than 1000 picture files,for example and no matter how I optimize the memory usage of the app, it will crash to a limit of ram when it tries to display them.
What can I do in this case? Thanks
Note: I am testing the app on a Sony Xperia XA1 Ultra Android phone.