XSubImage

Syntax

XImage *XSubImage(ximage, x, y, subimage_width, subimage_height)
      XImage *ximage;
      int x;
      int y;
      unsigned int subimage_width;
      unsigned int subimage_height;

Arguments

ximage Specifies the image.
x
y
Specify the x and y coordinates.
subimage_width Specifies the width of the new subimage, in pixels.
subimage_height Specifies the height of the new subimage, in pixels.

Description

The XSubImage() function creates a new image that is a subsection of an existing one. It allocates the memory necessary for the new XImage structure and returns a pointer to the new image. The data is copied from the source image, and the image must contain the rectangle defined by x, y, subimage_width, and subimage_height.

See also

XAddPixel(), XCreateImage(), XDestroyImage(), XGetPixel(), XPutPixel(), "Manipulating Images".
Christophe Tronche, [email protected]