Header and Scan Order
The first 4 octets of the file gives the width of each line (x direction), and the next 4 octets should give the number of lines of the display (length, y direction). After this is one octet for the x increment and one octet for the y increment. Following these 10 octets is the bitmap itself. The length and width fields are stored most significant octet first.
The x and y increment octets tell how much space is between pixels. For an ordinary display, both these would be one.
Each line of the display should be scanned from left to right. The lines should start at the top and work down. Each line in the bitmap should end on an octet boundary. If the width of the display is not divisable by 8, the rest of the last octet should be filled with zeros on the right.