kane@steinmetz.UUCP (Joseph Kane) (09/18/88)
This mail message arrived on steinmetz without a control file and is being forwarded on. --------------------------------------------------------------------- Received: by expo.lcs.mit.edu; Fri, 2 Sep 88 22:20:22 EDT Received: by ATHENA.MIT.EDU (5.45/4.7) id AA17749; Fri, 2 Sep 88 22:20:31 EDT Received: by BLOOM-BEACON.MIT.EDU with sendmail-5.59/4.7 id <AA05992@BLOOM-BEACON.MIT.EDU>; Fri, 2 Sep 88 22:12:48 EDT Received: from USENET by bloom-beacon.mit.edu with netnews for xpert@athena.mit.edu (xpert@athena.mit.edu) (contact usenet@bloom-beacon.mit.edu if you have questions) Date: 3 Sep 88 00:56:21 GMT From: vsi1!daver!athsys!jim@AMES.ARC.NASA.GOV (Jim Becker) Organization: Athena Systems, Inc., Sunnyvale, CA Subject: Re: XRdBitF.c: faster bitmap reading code for libX11.a Message-Id: <132@tityus.UUCP> References: <13842@agate.BERKELEY.EDU> Sender: xpert-request@athena.mit.edu To: xpert@athena.mit.edu From article <13842@agate.BERKELEY.EDU>, by jkh@violet.berkeley.edu (Jordan K. Hubbard): > In article <129@tityus.UUCP> jim@athsys.uucp (Jim Becker) writes: > > Great. Do the plans for R3 also provide a routine for getting just the bits > from a bitmap image, so that one can then convert it into a pixmap > of arbitraty depth and color(s)? > Jordan This is the primary reason that I had to originally get into this code, as it builds you a pixmap rather than letting you get to the bits. (This was a change that was put in with the X10->X11 changes.) By cloning this routine, renaming it and modifying the logic not to create the pixmap from the data you can get what you want. If you return the "data" pointer instead of a pixmap XID you can then get at the bits. Also, there was a minor bug to this that causes it not to be reentrant. The "fstream" variable should be local to the XReadBitmapFile routine, and passed to the routine NextInt. Otherwise there could be problems. Otherwise, it seems fine. Email me if this is not clear, as I want to keep net clutter down. -Jim Becker