capture() — Silicon Graphics
NAME
capture, rcapture - dumps screen images to file or hard copy device
SPECIFICATION
C
capture(dest, cmap)
char *dest;
RGBvalue cmap[][3];
rcapture(dest, cmap, left, right, bottom, top,
dithsize, dithmat, res)
char *dest;
RGBvalue cmap[][3];
Screencoord left, right, bottom, top;
long dithsize, res;
short *dithmat;
FORTRAN
subroutine captur(dest, length, cmap)
character*(*) dest
integer*4 length
character*1 cmap(3,*)
subroutine rcaptu(dest, length, cmap, left, right, bottom, top,
dithsi, dithma, res)
character*(*) dest
integer*4 length
character*1 cmap(3,*), dithma(dithsi, dithsi)
integer*4 left, right, bottom, top, dithsi, res
Pascal
procedure capture(dest: pstring128; var cmap: RGBvalue);
procedure rcapture(dest: pstring128; var cmap: RGBvalue;
left, right, bottom, top: Screencoord;
dithsize: longint; var dithmat: Short; res: longint);
DESCRIPTION
capture dumps a representation of the screen into the file dest in a format compatible with a Tektronix 4692 color inkjet printer. In C if dest is 0, then it will create a file called capture.img. The function used to open dest for output allows for spooling to other machines, such as print servers (see the coloropen manual pages in Section 3 of the UNIX Programmer’s Manual, Volume 1). In C if cmap is 0, then capture will read the colormap from the hardware. Otherwise, cmap should be a pointer to a array of RGBvalue triplets. This is not available in FORTRAN. In FORTRAN you cannot pass a zero, because FORTRAN passes all variables by reference. The size of the array depends on how many bitplanes you have and whether you are dumping an RGB image or a colormapped image. For a colormapped image, the size of the array should be 2NUMBER_OF_PLANES.The array is used as a software colormap of indices that identify the red, green, and blue values for each pixel. For RGBmode, only the first 256 entries in the array are used. In RGBmode, each channel (red, green, and blue) is looked up individually.
rcapture is an extension of capture that allows you to specify a few more variables. The arguments left, right, bottom, top determine a rectangular section of the screen to capture. dithsize and dithmat are used for software dithering. dithmat should be a square matrix of size dithsize. If either dithsize or dithmat (or both) are 0, then no dithering is done. In FORTRAN the dithsize has to be zero.
The Tektronix printer accepts data containing 1, 2, or 4 bits per RGB component per pixel. The last argument, res, selects which of these formats to generate. The printer only has four colors (cyan, magenta, yellow, and black) and uses internal dithering if more than one bit per component is specified. One bit per component is used if dithering is selected.
In FORTRAN there is an extra argument, length, that is the number of characters in the dest string.
SEE ALSO
Manual pages for the following commands are located in the UNIX Programmer’s Manual, Volume I:
colord(1), coloropen(3), tek(7)
NOTE
This command can be used only in immediate mode.
This command only works on workstations.
Version 2.4 — May 08, 1986