Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!wuarchive!usc!ucsd!helios.ee.lbl.gov!pasteur!ucbvax!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU (Bob Scheifler) Newsgroups: comp.windows.x Subject: Re: Clip Masks Message-ID: <8912151355.AA01035@expire.lcs.mit.edu> Date: 15 Dec 89 13:55:08 GMT References: <1506@utkcs2.cs.utk.edu> Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 13 1) XCreateImage requires a visual which must "match the visual of the window [or pixmap, I presume] the image is to be displayed in". You can just pass NULL for the visual. The visual is really only used to set the red/green/blue_mask components in the image, and those components are actually never used by Xlib itself. XPutImage(display, clip_mask, gc, tmpimage, 0, 0, 0, 0, width, height); You didn't show the code that created the gc. My guess is that you created the gc for the wrong depth, e.g. depth 8 instead of depth 1.