~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to applic/proc/screendump.prg

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
2
 
3
! Midas procedure screendump.prg
 
4
! U. Kaeufl     ESO - Garching
 
5
! 050527        creation
 
6
 
7
! make a screen dump of displayed image and save in inmage-file
 
8
! using xwininfo, xwd (from X11) and convert (from ImageMagick)
 
9
 
10
! use as @a screendump image-file
 
11
! where the type of image-file determines the format chosen,
 
12
! e.g. abc.gif, def.tiff or xyz.eps
 
13
! default of image-file is: midas_graph.jpg
 
14
!
 
15
! 050530        last modif
 
16
 
17
! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
18
 
 
19
defi/param   P1 midas_graph.jpg ? "Name of output file"
 
20
 
 
21
defi/local   sessnr/i/1/1      00      ! obvious
 
22
defi/local   dispunit/c/1/100   "MIDAS_xx display_y"     
 
23
defi/local   disp_id/c/1/20     "xx"                    !to hold display id
 
24
 
 
25
set/format  i2
 
26
write/keyw   dispunit/c/7/2 {mid$sess(9:14)}
 
27
set/format  i1
 
28
write/keyw   dispunit/c/18/1 {dazdevr(10)}
 
29
set/format  i4
 
30
 
 
31
$ xwininfo -root -tree   |  grep "{dispunit}" >  atmund
 
32
 
 
33
create/image    am_null 1,1
 
34
copy/ad     atmund  am_null dummy
 
35
 
 
36
! note, write/key disp_id <atmund  does not work due to
 
37
! "special" character ` " '
 
38
 
 
39
copy/dkey   am_null dummy disp_id
 
40
 
 
41
$ rm am_null.bdf atmund 
 
42
 
 
43
if mid$sys(1:3) .eq. "Lin" then
 
44
   $ xwd  -id {disp_id} -silent > gra2jpg_dummy
 
45
else
 
46
   $ xwd  -id {disp_id}  > gra2jpg_dummy
 
47
endif
 
48
 
 
49
$ convert gra2jpg_dummy {P1}
 
50
 
 
51
$ rm gra2jpg_dummy