VigneshK
VigneshK

Reputation: 803

Need to take snapshot of running application in x11

We need to take snap shots of running application by clicking a button in X11. We used XCopyArea function and copied the current image in a Pixmap. we need a way that how to same as image file in hard disk. Please help us. Thanks in advance.

Upvotes: 0

Views: 171

Answers (1)

parkydr
parkydr

Reputation: 7792

You can write the Pixmap to a file using:

int XWriteBitmapFile(Display *display, char *filename, Pixmap bitmap,
              unsigned int width, unsigned int height, int x_hot, int y_hot);

Upvotes: 1

Related Questions