Creating Image Files
Jay G. Horowitz
xxjgh at dali.lerc.nasa.gov
Fri Oct 5 00:06:29 AEST 1990
In article <9010031654.AA15425 at aero4.larc.nasa.gov> blbates at AERO4.LARC.NASA.GOV ("Brent L. Bates AAD/TAB MS361 x42854") writes:
>
> Go to /usr/people/4Dgifts/iristools/imgtools, the source file
>scrsave.c is what snapshot uses to save the screen.
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 a 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