[comp.windows.x] Getting the color of a pixel in a pixmap???

CWIKLA@uimrl7.mrl.uiuc.edu (John/Consultant) (04/11/91)

	Am I correct in thinking that the only way to get the color
of a pixel in a pixmap is to put it into an XImage structure, and then
use the XGetPixel function? 


******************************************************************************
*  John L. Cwikla             *   cwikla@uiucmrl, cwikla@uimrl7.mrl.uiuc.edu *
*  Chief Consultant, MRLCFC   *	  uimrl::cwikla		(217)333-8281        *
*  University of Illinois     *   Redefining Lunacy...			     *
******************************************************************************

klee@wsl.dec.com (Ken Lee) (04/11/91)

In article <1991Apr10.162147.13975@ux1.cso.uiuc.edu>, CWIKLA@uimrl7.mrl.uiuc.edu (John/Consultant) writes:
|> 
|> 	Am I correct in thinking that the only way to get the color
|> of a pixel in a pixmap is to put it into an XImage structure, and then
|> use the XGetPixel function? 

XGetImage is the most reliable way to get the data to the client.  You
can use XGetPixel or other similar methods to get the individual pixel
values.  The actual colors associated with the pixel values depend on
the current colormap.

-- 
Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee