jkuo@ulysses.homer.nj.att.com (Jeff Kuo[cwc]) (07/29/89)
Thanks to all those who responded to my question about XPutImage. It turns out that the actual error lies with the depth of the screen. I'm using an AT&T 6386 machine, but I didn't know that the depth is 4, not 8. Using any other int won't work, not 1, not 2. The worst part is that no complaints are issued when the XImage is created (that's where the depth is specified). Only when XPutImage is called does the error appear as an X Protocol Error -- parameter mismatch error. Anyway, I guess the lesson I learned is to use functions like int XDefaultDepth instead of guessing and putting the actual constant in the code. It's also more portable.