Path: utzoo!attcan!uunet!jarthur!nntp-server.caltech.edu!mustang!data!eagle!news From: xxjgh@dali.lerc.nasa.gov (Jay G. Horowitz) Newsgroups: comp.sys.sgi Subject: Re: Creating Image Files Message-ID: <1990Oct4.140629.16812@eagle.lerc.nasa.gov> Date: 4 Oct 90 14:06:29 GMT References: <9010031654.AA15425@aero4.larc.nasa.gov> Reply-To: xxjgh@dali.UUCP (Jay G. Horowitz) Organization: NASA/Lewis Research Center, Cleveland Lines: 35 In article <9010031654.AA15425@aero4.larc.nasa.gov> blbates@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@dali.lerc.nasa.gov (128.156.1.48) ..........................................................................