Re: Capturing & Displaying Screen Images with XGetImage & XPutImage
Re: Capturing & Displaying Screen Images with XGetImage & XPutImage
- Subject: Re: Capturing & Displaying Screen Images with XGetImage & XPutImage
- From: John Harper <email@hidden>
- Date: Wed, 3 Mar 2004 10:08:26 -0800
Hi,
Rootless X servers on Mac OS X typically don't have a root window, so
GetImage'ing from it returns undefined results. If what you want to do
is to fetch the contents of a window you created, try passing that
window id to GetImage instead of the root window,
John
On Mar 3, 2004, at 9:13 AM, Dean N. Williams wrote:
In case, those were wondering what the function calls look like:
ximage = XGetImage(display,
RootWindowOfScreen(DefaultScreenOfDisplay(display)),
x1, y1, width, height, XAllPlanes(), ZPixmap);
XPutImage(display,drawable, gc,ximage,0,0,0,0,width, height);
I suspect, that the problem is possibly in XGetImage and that the
"RootWindowOfScreen" macro parameter doesn't work for the Mac OS X
platform. What root screen does it grab?
Best regards,
Dean
On Mar 3, 2004, at 8:14 AM, Dean N. Williams wrote:
Dear X11-Users,
I am porting my X11 climate application to the Mac OS X environment,
which I am new to. I have ported my application to all the major
Linux and Unix platforms and for the most part, I've ported it to the
Mac OS X platform as well. There is only one Mac OS X problem that I
am experiencing and this problem deals the use of XGetImage (X11 call
to capture the screen/window contents) and XPutImage (X11 call to
display the saved image in a window). These two X11 functions are
used to generate and display animations.
Although I do not receive errors in my application when using these
two X11 functions, I do get a BLACK screen (when I should get back an
image). I am not sure if the image is not saved correctly or if the
image is not displayed in the window correctly. In any case, I am
getting a BLACK screen, which is not correct.
From one of the FAQ lists, I saw that "gimp" also displayed a black
screen when it should have displayed an image. Has anyone else run
into this BLACK screen problem when using XGetImage and XPutImage?
Thank you in advance for your help.
Best regards,
Dean
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/x11-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/x11-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
Do not post admin requests to the list. They will be ignored.