Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with XGetImage and XPutImage

Status
Not open for further replies.

Themuppeteer

Programmer
Apr 4, 2001
449
BE
Hello,

My problem:

I have a linux pc,and a win pc that runs vncserver.
I want to copy a window with XGETIMAGE and display it again on another display,in another window.

This is what I do:

Window mywin=XCreateSimpleWindow(dis2,RootWindow(dis2,0),0,0,width,height,WhitePixel(dis2,0),BlackPixel(dis2,0),0);

XMapWindow(dis2,mywin);
XFlush(dis2);

//lets say twin is my other window with the same height and
//width,and a few rectagles...
XImage *myimage=
XGetImage(dis1,twin,0,0,width,height,AllPlanes,XYPixmap);

XPutImage(dis2,mywin,XCreateGC(dis2,twin,0,0)
,myImage,0,0,0,0,width,height);


My Result:

a black window with nothing in!

Can NE1 help me ?

thnx.

The Muppeteer.

themuppeteer@hotmail.com

Don't eat yellow snow...
 
When I display it on the same screen,it works...
I think it has somthing to do with the color depth that is 16bit on my linux pc and so I think vnc only supports 8 bit...
The Muppeteer.

themuppeteer@hotmail.com

Don't eat yellow snow...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top