Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!think.com!mintaka!bloom-beacon!ncd.COM!jim From: jim@ncd.COM (Jim Fulton) Newsgroups: comp.windows.x Subject: Re: XImages Message-ID: <9012121928.AA08593@hansen.com> Date: 12 Dec 90 11:28:19 GMT References: <927@attc.UUCP> Sender: daemon@athena.mit.edu (Mr Background) Organization: Network Computing Devices, Mountain View, CA Lines: 39 For image bit order, MSBfirst/LSBfirst are crystal clear. But when it comes to byte order ... If it helps, here's a description that I wrote up recently: Definitions: BitmapPad specifies the number of bits to which each glyph scanline will be padded. This value will always be greater than or equal to BitmapUnit. BitmapUnit specifies the number of bits that should be treated as a unit for swapping. ImageByteOrder specifies whether the Most- or Least-Significant Byte of each bitmap-unit will be returned first. BitmapBitOrder specifies whether the left-most bit in each glyph bitmap-unit is stored in the Most- or Least-Significant Bit of transmitted bitmap-unit. Algorithm: Each scanline is padded to a multiple of the number of bits specified by BitmapPad. The scanline is then divided into a sequence of BitmapUnit bits. The bits of each unit are then swapped such that the left-most pixel is stored in the most- or least-significant bit, according to BitmapBitOrder. The bytes of each unit are then swapped such that the most- or least-significant byte is transmitted first, according to ImageByteOrder. Jim Fulton Network Computing Devices jim@ncd.com