[comp.windows.x] Displaying Bitmaps in X

sandeep@ur-laser.UUCP (Sandeep Mehta) (08/13/87)

This may seem like a naive question, but I think I am missing something which
the Xlib V10 document has on Bitmaps. I have a dithered image buffer which 
I want to display in a window. Using XPixSet() works fine, but takes forever
to display especially if I have an image larger than 512x512 !! 

The alternative is to display the entire buffer using XBitsmapBitsPut(), with
the mask set to 0, GXcopy, & AllPlanes. The image displayed is a set of 
vertical lines, which look like a part of the image ?? I shift the pixel
values such that the leftmost bit is the LSB, to conform with the 
scanline data representation, which does'nt really help.

Could someone post a mini code fragment to get around this. It looks like
this at present

        for ( i = 0 ; i < rows ; i++)
            for ( j = 0 ; j < cols ; j++)
                XPixSet(imagewin,j,rows-i,1,1,buffer[i][j]);

Thanks in advance

sandeep 

***********************************************************************
Sandeep Mehta
Lab for Laser Energetics
Univ. of Rochester.

Tel. (716)-427-2379 (H)
     (716)-275-5101 (W)

ARPA: ur-laser!sandeep@rochester.edu
UUCP: {allegra,seismo}!rochester!ur-laser!sandeep
BITNET: snm1237@ritvaxa.BITNET

***********************************************************************