swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'making movies': a sitrep


From: Sven N. Thommesen
Subject: Re: 'making movies': a sitrep
Date: Fri, 11 Apr 1997 17:54:53 -0500

A follow-up to the previous message:

to make as convenient as possible the taking of graphical snapshots of
individual Swarm graphs and rasters, I have taken the steps below. 

(I run Linux on Intel, RedHat Linux to be specific. I use Fvwm2 as my
window manager (under linux 3.0.3) and RedHat's TheNextLevel under linux
4.0. The programs mentioned may or may not be included in commercial
Unices, but should be easily available on the net.)

a) I have a button bar defined which is 'sticky' on my screen. I have
defined a 'Print' button thus (in .fvwm2rc):

*FvwmButtons (Title Print, Action "Exec xvwd &")

Note: in TheNextLevel it's more complicated; I have defined the above line
in .fvwm2rc.modules. [This file is located either in /etc/X11/TheNextLevel
or in your user directory. Remember to use 'ls -a' to find files that begin
with a period! ] I've ignored the PRINT_FUNCTION stuff already defined.

b) I have created the shell script 'xvwd' in /usr/bin (mode 755) :
----- begin xvwd -----
#!/bin/bash
# Uncomment the line of your choice below:
# This line results in a XWD format file:
# xwd $1 $2 -frame -out ./xvwd.$$.xwd
# This line results in a PPM format file:
# xwd $1 $2 -frame | xwdtopnm > ./xvwd.$$.ppm
# This line results in a GIF format file:
# xwd $1 $2 -frame | xwdtopnm | ppmtogif > ./xvwd.$$.gif
# This line results in a JPEG format file:
# xwd $1 $2 -frame | xwdtopnm | cjpeg > ./xvwd.$$.jpg

# And this line gives you all formats:
xvwd $1 $2 -frame > ./xvwd.$$.xwd; xwdtopnm < ./xvwd.$$.xwd > xvwd.$$.ppm;
ppmtogif < ./xvwd.$$.ppm > ./xvwd.$$.gif; cjpeg < ./xvwd.$$.ppm >
./xvwd.$$.jpg
----- end xvwd -----

End result:
* clicking on 'Print' yields a beep and a different-looking cursor; click
on the window you want to save; a beep signals that the operation is
complete. You can click outside any window to capture the whole screen (the
'root window').

Comments:
* if you leave out '-frame' you should not get the window borders included
(see the documentation for xwd -- i.e. 'man xwd');
* note that the file names tell you what format the files are, but not what
kind of window was saved in them;

* creating different buttons for different output formats is left as an
exercise for the reader :-)

* also possible: creating different buttons marked for example 'print
heatspace', 'print unhappinessGraph' etc., so that the file names can be
programmed to reflect the kind of window that was saved.

Most desirable would, of course, be if we could figure out:
a) how to specify the 'window id' from inside Swarm so we can call xwd as a
subroutine;
b) how to get xwd to include window borders when called internally;
c) how to spawn a subshell that post-processes the .xwd files into other
formats.

Hope this was of use to someone!
--Sven


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]