Newsgroups: comp.windows.x Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!umich!wsu-cs!pandora.cs.wayne.edu!lee From: lee@pandora.cs.wayne.edu (Harrison Y. Lee) Subject: Display image in X Window Message-ID: <1991Mar23.002903.6900@cs.wayne.edu> Sender: Harrison Lee Reply-To: lee@pandora.cs.wayne.edu (Harrison Y. Lee) Organization: Wayne State University, Detroit Distribution: usa Date: Sat, 23 Mar 91 00:29:03 GMT Hi XWindow experts: I am new to X programming and I need to display an image on screen, I have to read from a file which contains a long string of gray values. I declare "char pixel" to hold the value. I then need to read those values from the file one pixel at a time and use (I think) XPutPixel to put them in my image. So far, it just gives me bus error (core dumped) error, I use dbx to run the program and it terminated at the XPutPixel line, I am wondering if anybody can give me some instructions or procedures on the correct procedures to define the image, open the window on the screen and display those pixels inside the window. Thanks alot for any suggestion!!!