4

I am looking for a daemon that allows me to programmatically display pictures under X and that listens to commands on a socket or network port.

Basically think mpd or xine, just not for audio or video but for pictures. A nice-to-have feature would be blending one picture into another, if requested via a command.

Any pointers?

Ok, why do I need that?
I need to script displaying pictures on the display based on various inputs, calling feh and friends (and killing them once the next picture is to be displayed) yields a not-so-nice black screen in between the pictures, there is no "crossfading" or any other effects in between the pictures.

Thanks!

Christian
  • 421
  • 5
  • 11
  • I thought `xine` might support jpg images, but it fails for me (v0.99.6). `xine-list-1.1 -p` shows `image/png` but pngs fail with the same error. Maybe more up-to-date versions have this fixed? – donothingsuccessfully Sep 27 '12 at 18:47
  • 1
    FYI, `xine image.png` works for me, and displays the image. But I've got xine 1.2... – derobert Sep 27 '12 at 19:45
  • `xine` from standard Ubuntu 12.04 repos works with pictures - I did not know that and the `xine` website sadly doesn't mention it. I will probably go with this option (stupid me, I could have at least tried it before asking...) as I have a set of xine-scripts that I have used for videos in the past. Thanks for the tip! – Christian Sep 28 '12 at 07:59

2 Answers2

3

I couldn't find anything specifically designed for this. However, I can think of a few ways to kluge it together:

  1. geeqie has a remote mode. This would be perfect, except there aren't transitions and you sometimes see an image load... Example (assuming you already have a geeqie running): geeqie -r -fs; for f in *.png; do geeqie -r file:"$f"; sleep 1; done; geeqie -r -fS

  2. mplayer2 with -slave -idle. mplayer can play PNG (etc.) using mf:// Start with a low fps (say, 1), and then immediately pause it. You should then be able to frame advance to the next picture. And add more with loadfile. Haven't tested this...

  3. Firefox running in full-screen mode, with setting that URLs opened replace current. You can use firefox --remote to control.

  4. Image viewer of choice, running on two different virtual desktops. Load an image in each, and use desktop switch to hide the load (and, depending on window manager, even give you a transition).

  5. Have a completely empty X session, and set the background (wallpaper) to the image. Plenty of command-line utilities to change wallpaper.

derobert
  • 107,579
  • 20
  • 231
  • 279
  • `geeqie` looks interesting, I will definitely take a look at that. I have trien mplayer, but I am having problems with exactly what you mentioned - pausing it just _right_ after displaying. `firefox` with the `remote` option looks interesting, maybe I can use that to draw text "above" the picture (see my comment above). Option 4 seems to be too hard for what I want here, 5 is definitely a nice hack to use as a fallback - thanks! – Christian Sep 28 '12 at 08:06
  • @Christian you can certainly draw text around an image in Firefox (with a simple HTML document). You could even do fancy stuff, if you're inclined to write some JavaScript. – derobert Sep 28 '12 at 14:29
3

ImageMagick's animate has a -remote option whereby you can run a command in an existing animate window. It doesn't do transitions, but you could use ImageMagick's other tools to create a transition GIF animation for each and display it between each solid image.

Ignacio Vazquez-Abrams
  • 44,857
  • 7
  • 93
  • 100
  • Good idea - I will look at the `animate` option, never used that before. Would this allow me to draw text onto the `animate` window (which I assume to be something like a canvas?)? - That way I don't have to render text onto the image, that takes about 8 seconds on my Atom - too long for my particular needs here. – Christian Sep 28 '12 at 08:02
  • Unfortunately `animate` only allows very basic operations on the image it's displaying. You would still need to use `convert` or the like to annotate the image. – Ignacio Vazquez-Abrams Sep 28 '12 at 12:50