XSubImage − create a subimage from part of an image.
Synopsis
XImage *XSubImage(ximage, x, y, subimage_width, subimage_height)
XImage *ximage;
int x;y;
unsigned int subimage_width;subimage_height;
Arguments
ximageSpecifies a pointer to the image.
x
ySpecify the x and y coordinates in the existing image where the subimage will be extracted.
subimage_width
subimage_height
Specify the width and height (in pixels) of the new subimage.
Description
XSubImage() 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 rectangle defined by x, y, subimage_width, and subimage_height must by contained in the image. XSubImage() extracts a subimage from an image, while XGetSubImage() extracts an image from a drawable. For more information on images, see Volume One, Chapter 6, Drawing Graphics and Text.
See Also
ImageByteOrder(), XAddPixel(), XCreateImage(), XDestroyImage(), XGetImage(), XGetPixel(), XGetSubImage(), XPutImage(), XPutPixel().
Copyright O’Reilly & Assoc. —