User avatar
sapnho
Posts: 216
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Image viewer with transition between images

Mon Sep 15, 2014 7:07 pm

I searched extensively for this one but I just can't find the right thing.

I am currently setting up a RPi to work as a digital picture frame. Plenty of very helpful instructions in the web, great.

Most of the image viewer projects seem to work with FEH. But FEH (apparently) doesn't do any transitions between photos and I was wondering if there was an other imager viewer software that I could use, to have various types of transitions (randomized) between photos.

Can anyone point me in the right direction? Thanks a lot!

elatllat
Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: Image viewer with transition between images

Tue Sep 16, 2014 1:46 am

XBMC ? Chrome+JQuery ?
SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

User avatar
sapnho
Posts: 216
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Re: Image viewer with transition between images

Tue Sep 16, 2014 5:22 am

Thanks, elatilat.

Has anyone built a picture frame (no need for a full multmedia center) based on this piece of software? I am not a programmer and haven't found a good example to loook at yet..
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

User avatar
sapnho
Posts: 216
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Re: Image viewer with transition between images

Tue Sep 16, 2014 6:47 am

Just found this software: http://blog.aaronvanderzwan.com/2012/07/maximage-2-0/

Anybody here using it with Raspberry Pi?
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

Ivan Tham
Posts: 75
Joined: Mon Jun 24, 2013 7:06 am

Re: Image viewer with transition between images

Tue Sep 16, 2014 2:27 pm

Use gpicview known as image viewer.

User avatar
sapnho
Posts: 216
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Re: Image viewer with transition between images

Tue Sep 16, 2014 3:10 pm

I am looking especially for an image viewer which offers some nice transitions between photos and gpicview seems limited in that area, but thanks for the lead.
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

gkreidl
Posts: 6129
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Image viewer with transition between images

Tue Sep 16, 2014 3:32 pm

Without support from the GPU you won't have much luck with transitions. The pi3d demos have some examples for slideshow code, which uses the GPU for soft blending or geometrical effects. But the bottleneck is the loading and converting of images to a format that can be used by pi3d.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

fruitoftheloom
Posts: 21057
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Image viewer with transition between images

Tue Sep 16, 2014 3:33 pm

sapnho wrote:I am looking especially for an image viewer which offers some nice transitions between photos and gpicview seems limited in that area, but thanks for the lead.
Raspbian Wheezy

Code: Select all

sudo apt-get update
sudo apt-get install gthumb
https://wiki.gnome.org/action/show/Apps/gthumb

https://help.gnome.org/users/gthumb/uns ... ow.html.en
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

User avatar
paddyg
Posts: 2427
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Image viewer with transition between images

Thu Sep 18, 2014 11:34 am

You've probably sorted something out for this now but for completeness:

The issue with pi3d slideshow (and probably applies to other systems as it's really a disk reading constraint) was that the pictures were being loaded from disk in a background thread and if that was happening at the same time a slide transition (movement, alpha etc) then the frame rate became jerky. This was only really noticeable where a queued image was large enough that it was still being loaded after the slide dwell time, generally when the show was being 'pushed' by pressing the next button. The fixes are: 1. for a picture frame application the dwell will be long enough to load very large images. 2. put a 'frame rate' constraint on the tweening i.e. the alpha will change at regular time delays rather than every frame.
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

gkreidl
Posts: 6129
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Image viewer with transition between images

Thu Sep 18, 2014 12:08 pm

paddyg wrote:You've probably sorted something out for this now but for completeness:

The issue with pi3d slideshow (and probably applies to other systems as it's really a disk reading constraint) was that the pictures were being loaded from disk in a background thread and if that was happening at the same time a slide transition (movement, alpha etc) then the frame rate became jerky. This was only really noticeable where a queued image was large enough that it was still being loaded after the slide dwell time, generally when the show was being 'pushed' by pressing the next button. The fixes are: 1. for a picture frame application the dwell will be long enough to load very large images. 2. put a 'frame rate' constraint on the tweening i.e. the alpha will change at regular time delays rather than every frame.
In fact I've written a really useful slideshow program based on the slideshow_2d example with lots of configuration options. To get the best results (60 Hz frame rate, fast image exchange for certain effects) it can use pre-cached texture objects (pickled texture objects).
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
paddyg
Posts: 2427
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Image viewer with transition between images

Thu Sep 18, 2014 1:39 pm

Sounds good. I nearly mentioned pickling (which I ended up using for the Scenery class to speed up loading) but the file sizes are much bigger.

I vaguely wondered about making a 'blend' style shader for truly fancy slideshow transitions (though I suspect simple fade is always going to be best). This would allow things like: the next slide is used as a normal map or distortion lens on the previous slide before merging into it, the previous slide gradually becomes more see-through according to the RGB of the following slide, the pixels change via some non-linear blend of the two slides.
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
sapnho
Posts: 216
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Re: Image viewer with transition between images

Thu Sep 18, 2014 2:08 pm

paddyg, your transition project sounds great!

I have been a long time user of large digital picture frames and a nice set of random transitions makes all the difference especially like the ones that you are describing.

How can I motivate you to give it a try and share it with the community? ;)
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

User avatar
paddyg
Posts: 2427
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Image viewer with transition between images

Thu Sep 18, 2014 2:25 pm

@sapnho, your enthusiasm is motivation enough. Just working outside at the moment (fixing roof, popped in for a cuppa) but I will have a look at this tonight. @hesspet has done some interesting stuff with shaders and might be able to use some of the results (or improve on them). There are some open source ones already here some of which I can probably lift code from, some look a bit 'heavy' or requiring complicated rendering to intermediate offscreen textures.
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
sapnho
Posts: 216
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Re: Image viewer with transition between images

Thu Sep 18, 2014 2:45 pm

Thrilling! :lol:

@paddyg: All I am looking for is a simple automatic viewer that randomly and endlessly shows photos in a folder, all the same size at 1920x1200 (which apparently is a problem with transitions), and has some great transitions - like the ones you decribed.

Great stuff!
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

gkreidl
Posts: 6129
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Image viewer with transition between images

Thu Sep 18, 2014 2:47 pm

My goals were not digital picture frames but presentation packages. For the moment I'm quite happy with highly configurable blendings (and faster image change times for graphical effects like decolorizing, dissolve into un-sharpness etc. by using multiple versions of the same image). Currently it looks like this:

Code: Select all

usage:
slideshow.py [options] [directory or playlist]
available options:
-f=FPS : frames/second - default = 20
-t=time : display time for each image in seconds - default = 5
-i=time : blend-in time in seconds, default = 0 (no blend)
-o=time : blend-out time of background image in seconds, default = 0 (no blend)
-d=time : blend-out-delay time of background image in seconds, default = 0 (no delay)
-s=scale : value = 1 (scale up and down) or 0 (scale down only if needed) - default = 1
-q=quality : resize quality, value = 1 (bicubic) or 0 (nearest) - default = 1
-c=checkfiles : check if files exist (playlist only), value = 1 (check) or 0 (don't) - default = 0
-w=window : run in Tkinter window if value = 1, default = 0 (no window)
-g=x,y,w,h : set area to play in, x,y upper left edge, w = width, h = height (in pixels) - default = full screen
and the tool to create cashed textures and playlists:

Code: Select all

usage:
cachetextures.py [options] source directory [cache directory]
available options (most only used for playlist creation):
-m=width : width = minimal width of image (skip smaller images) - default = 0
-t=time : show time for each image in seconds - default = 5.0
-i=blend-in : blend-in time in seconds  - default = 0.0 (no blend-in)
-o=blend-out : blend-out time in seconds  - default = 0.0 (no blend-out)
-d=blend-delay : blend-out delay time in seconds  - default = 0.0 (no delay)
-c=create_playlist : value = 1 (create) or 0 (don't) - default = 1 (create it)
The playlist is a text file which can be edited to set separate values for each image (display time and blending options)
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
sapnho
Posts: 216
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Re: Image viewer with transition between images

Thu Sep 18, 2014 7:53 pm

Lots to see and learn for me in the coming weeks! :?
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

User avatar
paddyg
Posts: 2427
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Image viewer with transition between images

Sat Sep 20, 2014 9:46 pm

ok so that took a bit longer than I thought. After my last post I nipped out for a nice bike ride on ilkley moor, but on the way home, an emergency stop to avoid a car overtaking on a blind bend resulted in a buckled back(?) wheel and hours in A&E and fracture clinic getting my hand in pot!!

Anyway I modified the slideshow_2d demo to use a single canvas with a carousel of textures and to use special shaders taking a foreground and background. I will tidy up the code a bit and add explanation then put it on github.com/pi3d/pi3d_demos develop branch as SlideTransition.py. I've only run it on the laptop at the moment but a wobbly video should appear here http://youtu.be/qjPCu4wT0A8.
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
sapnho
Posts: 216
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Re: Image viewer with transition between images

Sun Sep 21, 2014 3:21 am

Hi paddyg, so you are saying that you did the coding left-handed? ;)

So sorry to hear about your accident, get well soon! And good thing you avoided that car. All the best!

P.S.: The transitions look great!!
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

User avatar
paddyg
Posts: 2427
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Image viewer with transition between images

Sun Sep 21, 2014 8:41 am

Left IV metacarpal fortunately (not on an absolute scale obv!) Still v slow, although I can touch-type quite fast my conscious brain isn't used to where the keys are.

I've pushed to https://github.com/pi3d/pi3d_demos/tree/develop SlideTransition.py To run it you will need the blend_* files from shaders/ that also only exist in the develop branch. I will add some comments to the shaders so others can roll their own based on these examples.

PS just tried this on the rpi and it seems fine but, annoyingly, uses a method (set_textures) I've only just added to https://github.com/tipam/pi3d/blob/deve ... d/Shape.py so you will need to pull latest pi3d develop branch too (or change demo to use set_draw_details())
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
sapnho
Posts: 216
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Re: Image viewer with transition between images

Sun Sep 21, 2014 2:10 pm

Better your left IV metacarpal than a broken head!

As I am really new to Raspian, I will have to ask for a little help on making the installation, i.e. the exact commands that I will need to use in the terminal window... many thanks in advance! ;)

P.S.: Where do I stand? I have FEH running my slideshow on my RPi, cronjobs to turn the monitor on and off and a few other utilities. If I understand correctly, the Pi3D transition require a different software to be installed. Is that correct? Sorry, if my questions may be very noobie-like, but in the world of RPi and Raspian that's what I am.
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

User avatar
paddyg
Posts: 2427
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Image viewer with transition between images

Sun Sep 21, 2014 8:15 pm

@sapnho, firstly: I am happy to help if I can, and secondly: I think it's really worth while getting to grips with python programming and especially pi3d.. but zerothly: it is quite a bit of stuff to properly understand if you are starting from zero.

there are install instructions for pi3d here http://pi3d.github.io/html/ReadMe.html# ... spberry-pi
You need to decide whether to use python2 or python3 and install the appropriate pillow python imaging. The instructions are all there but I know it's very easy to miss part of a step and everything go awry! I will now modify the demo so it will work with the current stable (master branch) of pi3d. To get the demo it's probably easiest to clone the whole repository

Code: Select all

$ git clone https://github.com/pi3d/pi3d_demos.git
$ cd pi3d_demos
$ git checkout develop
$ git pull origin develop
if you give it a try and get stuck I'll try and help
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
sapnho
Posts: 216
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Re: Image viewer with transition between images

Mon Sep 22, 2014 3:05 pm

Ok, so I will dive into Python.. Any reason I should use 2 instead of the newer 3 with pi3d?

At the end of this project I will do a long post on "how to set up a nice picture frame with great paddy transitions" for dummies.. 8-)
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

User avatar
paddyg
Posts: 2427
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Image viewer with transition between images

Mon Sep 22, 2014 5:44 pm

The only reason for using 2 would be if there was a module you wanted to use that hadn't yet been ported to 3. That used to be the case for python imaging PIL but Pillow is the current, maintained version of the code and it works with Py3. The only drawback is that it's not incorporated in debian wheezy (to allow apt-get install to work) so you have to mess around as described in the pi3d docs.

It would be fantastic if you did fight your way through a full install and wrote it up as a guide. I would certainly add it to the docs.

A couple of things occur to me: 1. @gkreidl's slideshow program should be quite easy to alter to use this alternative shader transitioning as the Texture objects can be loaded from normal files or pickled ones. The advantage would be that it sounds to have been well thought out wrt launching and setting up (I've not actually seen it, is it part of kweb?) 2. There is a recently introduced FixedString class that allows Textures to be produced 'on the fly' using text which may have some application for slideshows or presentations
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

gkreidl
Posts: 6129
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Image viewer with transition between images

Mon Sep 22, 2014 8:27 pm

paddyg wrote: A couple of things occur to me: 1. @gkreidl's slideshow program should be quite easy to alter to use this alternative shader transitioning as the Texture objects can be loaded from normal files or pickled ones. The advantage would be that it sounds to have been well thought out wrt launching and setting up (I've not actually seen it, is it part of kweb?) 2. There is a recently introduced FixedString class that allows Textures to be produced 'on the fly' using text which may have some application for slideshows or presentations
No Paddy, it's not part of kweb and not published otherwise, yet. I have to do a bit of code clean-up and write a small documentation. I'd be happy to add it to pi3d demos. It's just a fine tuned version of slideshow_2.py anyway. BTW, I use ".tcache" as file extension for cached (pickled) textures.

There's one more reason why I didn't publish it yet. I'm using a patched version of pi3d because of a a small bug in the Tkinter GUI part. I'll send you more details via PM tomorrow.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
sapnho
Posts: 216
Joined: Sun Sep 14, 2014 3:49 pm
Location: Frankfurt am Main
Contact: Website

Re: Image viewer with transition between images

Tue Sep 23, 2014 5:42 am

Ok gentlemen, my LCD screen (formerly known as ASUS VS24AH and now a naked panel) is now off to be framed nicely, so I won't have access to my RPi for a few days as my other monitor does not have an HDMI input and I don't have an adapter here.

I'll write everything up that needs to be done and then we'll see! :?
www.TheDigitalPictureFrame.com
Build a really great digital picture frame with the Raspberry Pi.
With lots of great tips from this forum.

Return to “General discussion”