readRGB(3) — Unix Programmer’s Manual
NAME
readRGB - return values of specific pixels
SYNOPSIS
C
short readRGB(n, red, green, blue)
short n;
RGBvalue red[], green[], blue[];
FORTRAN
integer∗2 function readRG(n, red, green, blue)
integer∗2 n, red(n), green(n), blue(n)
Pascal
function readRGB(n: Short; var red, green, blue: RGBarray): Short;
DESCRIPTION
ReadRGB is the RGB mode version of readpixels, and allows pixel values to be read from up to 24 bitplanes. It returns n RGB values in the red, green, and blue arrays, starting at the current character position. In addition, it returns the number of pixels read, which may be less than n if you attempt to read pixels with x > XMAXSCREEN.
As long as the current character position is inside the viewport when the readRGB command is issued, any number of RGB pixels can be read, including those outside the viewport.
ReadRGB will not advance to the next row of pixels when the cursor reaches the edge of the screen. The current character position is updated when the readRGB command is executed. The current character position is set to one pixel to the right of the last one read, or invalidated if the new position is outside the viewport.
SEE ALSO
readpixels, writeRGB
NOTE
This command can only be used in immediate mode.
Silicon Graphics — R1c