Wed Nov 19, 2014 11:29 am
fbi won't :-
run in the background (if you 'loop' it, it has to be in the foreground, so your script 'stops' on the fbi command)
accept images via stdin (or via any sort of 'pipe')
clear up after itself (if you run if with a single image you 'get back focus' and the image stays 'on screen' - if you run it again, it swaps out the image on screen BUT it uses more RAM .. if you run it 50 times (to show 50 different images) the Pi will crash with 'insufficient RAM')
So here's my 'fix' to get fbi to show 'arbitrary' images (and 'pause' a fbi slideshow) = I expect my 'cunning trick' with soft links (alias) will help you ..
I will set fbi to 'loop for ever' showing 3 'static' image names, d.jpg, a1.jpg, a2.jpg (see note at end)
Make a1.jpg and a2.jpg both 'alias' of d.jpg (ln -s -f d.jpg a1.jpg, ln -s -f d.jpg a1.jpg)
When you want to 'display a new image', make d.img an alias of the new image (ln -s -f new.jpg d.jpg)
(so my slide show will 'pause' as the 'display a new image' (background task) checks for a button push before changing the alias to a new image)
NOTE. fbi has to be started with (at least) 3 images, since even with -chachemem 0, fbi will 'cache' 2 images (and thus never load the 'change')
eg. fbi -d /dec/fb0 -a -noverbose -t 3 -cahcemem 0 d.jpg a1.jpg a2.jpg
(with -t I set it to run 'for ever' on a 3 second cycle over the 3 images - so changing d.jpg should result in the new iamge appearing within 1s)
NB don't be tempted to COPY new.jpg to d.jpg (fbi will show 'corrupted' data on screen as the file it's in the process of loading is overwritten by the cp)
Whilst this 'seamlessly' changes from one image to the next, I still have a problem with fbi crashing (may be due to feeding it an 'undispayable' image = I'm just looping through a dir listing )