#9 how to display series of images at specific screen location?

v1.0_(example)
closed
None
5
2014-01-06
2011-10-08
andré
No

I can use "gm animate ..." to display a series of images - but always at top left
I can use "gm display ..." to display images at a specific location - and even display a series once

But I can't figure out how to display a series of images continuously at a specific location

As well, it would be nice to be able to display in a set frame and set the background colour.

Does anyone have any suggestions ?

Discussion

  • Use an argument like '-geometry +200+200' to tell animate and display where to position its window. This is an X11 thing.

    As far as the set frame goes, I am not sure if everything you want is currently possible. The -backdrop option will take over the entire screen and then -geometry can still be used to place within the screen.

     
  • andré
    andré
    2011-10-08

    Thanks for your response.

    With gm animate, -geometry +200+200 (or similar) does not position the display, which remains at top left. It also trucates images that fall outside the dimensions of the first image displayed, if the designated dimension in -geometry is larger than that actually displayed for the first image.

    E.g., for
    gm animate -geometry "300x400+100+50" ...
    with the first image 400x600, the window is set by the first image, and will actually be 267x400 (since proportions are kept by default).
    An image that is wider than 400 but shorter than 600 will be proportionally reduced to 300 width (which is appropriate), and then truncated to 267 on display.
    What should happen is either the initial window should be 300x400 as specified, or that each new image should have its own window, which falls inside 300x400. (The latter being what gm display does.)
    As well, images smaller than the initial image leave parts of previous images in the display window.

    With gm display, -geometry +200+200 positions correctly, but displays each image exactly once and then quits. And not continuously as I wanted.
    However it does display every image correctly, in it's own window. Although that could be ok, I would prefer to have one window (or frame) in which all images are displayed.
    I have another application (feh) that does most of what I want (but not the important positioning, which it doesn't even attempt).

    In sum, with my tests, animate doesn't respect positioning, truncates in some cases, and doesn't fill backgrounds. But it does loop nicely.
    Display doesn't loop, but doesn't have the other problems. (It doesn't have backgrounds.)

    And it would be very nice to have frames, which seem to be available for other gm groups.
    I've seen the -backdrop option, which takes over the entire screen : I'm looking for display confined to the region specified by -geometry.

    But then maybe it is largely a matter of documentation ?

    BTW, one of the reasons I would like to use gm for this is, unlike most alternatives, it is very good for positioned display of fixed images, so one application can do everything.

    (abbreviations would be nice, however -- like -g for -geometry -- since command lines tend to get rather long)

    In my tests I tried redirection and pipes as a workaround, which if it worked would have essentially solve my problems.
    e.g gm animate ... > gm display ...
    or gm animate ... | gm display ...
    In my tests, with ">", gm animate complained about the presence of "display", and in most cases continued as if "> gm display" were not in the command line.
    If I used "|" instead, gm animate complained about "|" and quit.
    Typically (particularly under Unix/Linux),
    cmd1 ... > cmd2 ...
    or
    cmd1 ... | cmd2 ...
    (depending on the program)
    will feed the output of cmd1 to cmd2
    (Using stdout and stdin)

    The problems I've having seem to indicate that "gm animate" and "gm display" use different routines for display. (Not surprising since imagemagick is a collection of different programs.) It would be nice if there were more integration into common routines, with identical functioning.

    Regards

     
    • assigned_to: nobody --> bfriesen
     
  • This does something somewhat useful for me:

    gm convert -compose Copy -gravity center mommycat.ppm seaworld.ppm -extent 1530x1020 miff:- | gm display -title 'My Animation' -geometry +100+100 -delay 10 -

    and this works too:

    gm convert -background blue -compose Copy -gravity center mommycat.ppm golfer.ppm tiger.ps seaworld.ppm -extent 1530x1020 miff:- | gm animate -title 'My Animation' -geometry +100+100 -delay 100 -

    and this does almost as well except that it exposes a bug and does not provide positioning control:

    gm convert -delay 10 -compose Copy -gravity center mommycat.ppm seaworld.ppm -extent 1530x1020 x:

    Note that in order for 'gm display' to know that it should take input from a pipe, one must use '-' as the filename.

    It should be possible to decorate the images any way you like in the processing pipeline such as using -border.

    If you are a good programmer, then you can help make GM better buy submitting a patch to improve the crufty software.

     
    • status: open --> closed
    • Group: --> v1.0_(example)
     
  • This useful discussion seems to have ceased. Setting to "closed" status.