Fixed to allow for bitmaps wider than 3 bits.