Fifteen or Sixteen Bits-Per-Pixel Format

Fifteen or sixteen bits-per-pixel format is a masked format, and is not palettized. For either fifteen or sixteen bits-per-pixel, pixels are stored one per two-byte word; fifteen bits-per-pixel format wastes the high-order bit of each word. Microsoft recommends using the following masks to extract red, green, and blue values:

Color Fifteen-Bit Mask Sixteen-Bit Mask
Red 0x7C00 0xF800
Green 0x3E00 0x07E0
Blue 0x001F 0x001F

As those masks show for fifteen bits-per-pixel, the low order fifteen bits of each word contain the pixel's data. The unused bit should contain zero. Memory for this format can be arranged like this: