What is the best way to display fast switching with bunch of images in raspberry pi?

#1

hello all.
what is the best and efficient way to display bunch of images (fast transition animation)?

basic idea is hold about 10,000 images and randomely select 20~50 images and display fast switching image animation in certain time trigger by something event.

as far as I know, raspberry pi has very limited memory, so definitely cannot load of all images. so… probably get random index number between 0 - 9999 and load that images… and displaying …

it’s just idea… I’ll gonna write and test soon… but
anyone have good suggestion ?

#2

Take a look at this thread

Maybe do some tests and see how many images you can handle at once, make two arrays (using pixels and just uploading to textures as you need as outlined in the discussion) for this amount and as you are using one set you can load another set in a background thread. You can use them in a cyclic way, using one set to draw while you have another set loading.

#3

Also i would recommend using ofThreadChannel instead of mutexes if you want to avoid some headaches.

The ofxThreadedImageLoader is a good place to look into to see how to use it or any of the examples.

Apart from that freeimage is relatively slow so something like libjpeg-turbo can make loading much faster in the raspberry

#4

@fresla , @arturo thanks all :smiley: ! I’ll checking !