XGetPixel(3X) XLIB FUNCTIONS XGetPixel(3X)NAME
XGetPixel - returns the specified pixel from the named image
SYNTAX
unsigned long XGetPixel(ximage, x, y)
XImage *ximage;
int x;
int y;
ARGUMENTS
ximage Specifies the image.
x
y Specify the x and y coordinates.
DESCRIPTION
The XGetPixel function returns the specified pixel from the named image. The pixel value is returned in normalized format (that is, the
least-significant byte of the long is the least-significant byte of the pixel). The image must contain the x and y coordinates.
SEE ALSO XInitImage(3X), XCreateImage(3X), XPutPixel(3X), XSubImage(3X), XAddPixel(3X), XDestroy(3X)X Version 11 Release 6 XGetPixel(3X)
Check Out this Related Man Page
XSubImage(3X) XLIB FUNCTIONS XSubImage(3X)NAME
XSubImage - image utilities
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 XInitImage(3X), XCreatImage(3X), XGetPixel(3X), XPutPixel(3X), XAddPixel(3X), XDestroyImage(3X)X Version 11 Release 6 XSubImage(3X)
Hi everyone...
I'm working with XLib and I want to find out the pixel value of a particular point on screen and then map it to RGB values. I used XGetImage and XGetPixel to get the pixel value, but how do I get the RGB values of the pixel?
I went through a few XLib manuals, there seems to be no... (1 Reply)
i was able to make a connection to X server and get a screen shot using XGetImage, now, im unable to save this XImage to any good format like PNG, i found a code that saves it to bitmap, but the resulted bitmap file is massive, is there anyway i can save this XImage to PNG directly?
thanks; (7 Replies)
I need to rotate a pixmap in XLib with some kind of interpolation to reduce the aliasing.
I came up with the following code, which uses bilinear interpolation. It works fine: the rotated image looks perfect, but unfortunately it takes 5 or 6 seconds for each rotation. (in a 300x300, 16 colours... (5 Replies)