Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!udel!burdvax!shuda From: shuda@PRC.Unisys.COM (Lester Shuda) Newsgroups: comp.windows.x Subject: Re: XCopyPlane() bug (sort of). Message-ID: <14385@burdvax.PRC.Unisys.COM> Date: 12 Jul 90 12:20:46 GMT References: <9007101642.AA12606@hansen.com> Sender: news@PRC.Unisys.COM Organization: Unisys Corporation, Paoli Research Center; Paoli, PA Lines: 29 In article <9007101642.AA12606@hansen.com> lemke@ncd.COM (Dave Lemke) writes: > > From: uunet!ucbvax.berkeley.edu!pasteur!graft!scott (Scott Silvey) > Date: 9 Jul 90 22:13:49 GMT > > I am trying to turn a window's image into an X11 bitmap. I want to write thi >s > bitmap out to a file using XWriteBitmapFile(). > > However, I can't find any way to do this using XCopyPlanes or XGet/PutImage i >f > the window is on a color display (multiple planes). There is apparently > no way for me to copy the information from the window to a single plane > bitmap short of checking each and every pixel one at a time. > If you just want to use XWriteBitmapFile(), just use the window as the Drawable argument. If you want to actually copy into an intermediate Pixmap, create a multiple plane Pixmap (same depth as your source window) and then use XCopyArea to copy into that. You may then use this Pixmap as an argument to XWriteBitmapFile. I haven't been able to get XWriteBitmapFile to work with actual bitmaps (i.e. 1 bit deep Pixmaps). ************************************************************************* * Les Shuda net: shuda@prc.unisys.com * * L. Shuda Consulting phone: (215) 648-2524 *