Screen Capture Footnote

Jay G. Horowitz xxjgh at dali.lerc.nasa.gov
Thu Oct 4 23:42:53 AEST 1990


WARNING to those looking towards scrsave as an answer to their screen-saving
problem:

Do not be fooled by the apparent simplicity of scrsave.c. There is an
undocumented subtlety in its usage. From our experiences it is crucial
that the code within scrsave (or user-modifications of it) not be imbedded
directly in a program that uses a graphics port. Note that scrsave runs
with noport(); winopen();. Snapshot and others that require a graphics
port to allow you do establish your capture window, eventually do a:

	system ("scrsave 0 1280 0"); /* or whatever xmin, xmax, ymin, ymax */

which spawns a new process.

I assume that doing a succesfull screen capture (i.e., capture pixel rgb
regardless whether that pixel was colormap, rgb, window border, background,
or whatever) can only be done by a process that is not tied to a particular
window. I can kind of guess why this would be so, but haven't invested
the time to really understand it. I got my application to work and quit
while I was ahead.

If the above is incorrect I would appreciate being humbled on the network
by an appropriate guru.

--
..........................................................................
  Jay G. Horowitz                    "For the finest in kosher pixels!"
  NASA Lewis Research Center        
  (216) 433-5194                    xxjgh at dali.lerc.nasa.gov (128.156.1.48)
..........................................................................



More information about the Comp.sys.sgi mailing list