2

I’ve got a stream of images (jpg) and I want to display each one as soon as it arrives. So, basically, here is what I want:

  1. There is currently some image on the screen;
  2. a new image arrives, my script is called with the path to the image;
  3. the new image is on the screen instead of the old one;
  4. goto 2.

What I tried:

  1. ImageMagick’s display. It doesn’t have an option to scale the image to fit the window, that’s bad but, well, I can use -resize to scale to some reasonable fixed size. Also it has -remote to display a new image in the same instance. The problem is that there is no way to combine -resize and -remote.
  2. convert+display. Using convert to resize the image (again, to some fixed size which is unfortunate), saving it to a temporary location and calling display -remote to display it. For some reason the convert step is horribly slow.
  3. Gwenview, kuickshow. Neither seems to be able to display a new image in the previous instance.
  4. feh can fit images (--scale-down) but doesn’t have a single-instance mode. The closest I could get is using feh --bg-max which scales the image to fit the screen and sets is as background. That works pretty well, but it’s clearly an ugly hack. Also it would be nice to display images in normal windows, not in the root one.

Any ideas?

1 Answer 1

2

Geeqie is able to do what I want.

It has two useful options: -r to act on a remote instance and -t to hide all the interface. So:

geeqie -r -t <img_file>

does exactly what I described: opens <img_file> in the same window fitting to window size.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .