VGetImage


 
Name
  VGetImage - reads the image in the specified window.
 
Synopsis
  VGetImage(win, ximage, xloc, yloc, width, height)
  Window win;
  XImage **ximage;                      /*RETURN*/
  int xloc, yloc;
  int width, height;
 
Description
  VGetImage reads the image in the specified window and returns the image to
**ximage. The image to be returned can be specified within a rectangle in
a window. The memory allocated by VGetImage can be freed by calling 
XDestroyImage().
 
Return Value
  0 - work successfully.
  1 - memory allocation error.
  238 - cannot get enough memory for the image.
 
Parameters
  win - specifies the ID of the window.
  xloc, yloc - specifies x and y coordinates of the upper left corner of the
        rectangle, relative to the origin of the window.
  width, height - specifies the width and height in pixels of the image.
  ximage - returns a pointer to an XImage pointer structure. This structure
        provides the contents of the specified rectangle of the window in
        the format specified.
 
Side Effects
  None.
 
Entry Conditions
  If xloc, yloc, width, or height is not valid, or VCreateColormap is
not called earlier, VGetImage prints an error message to the standard error
stream, produces a core dump file and exits from the current process.
 
Related Functions
VPutImage.