RGB pixel formats


These formats are defined below. Click on the Label/FOURCC to be taken to its definition.

Please see "Bitmap Orientation and biHeight" for important additional information. Also, if you are interested in RGB to YCrCb conversion, you may find this page helpful.

Label FOURCC in Hex Bits per pixel Description
BI_BITFIELDS0x0000000316,24,32Raw RGB with arbitrary sample packing within a pixel. Packing and precision of R, G and B components is determined by bit masks for each.
BI_RGB0x000000001,4,8,16,24,32Basic Windows bitmap format. 1, 4 and 8 bpp versions are palettised. 16, 24 and 32bpp contain raw RGB samples.
BI_RLE40x000000024Run length encoded 4bpp RGB image.
BI_RLE80x000000018Run length encoded 8bpp RGB image.
raw0x32776173?Apparently "raw, uncompressed RGB bitmaps" but I have no idea how many bits per pixel (uses bpp field in header?)
0x324247521,4,8,16,24,32Alias for BI_RGB
RGBA0x4142475216,32Raw RGB with alpha. Sample precision and packing is arbitrary and determined using bit masks for each component, as for BI_BITFIELDS.
RGBT0x5442475216,32Raw RGB with a transparency field. Layout is as for BI_RGB at 16 and 32 bits per pixel but the msb in each pixel indicates whether the pixel is transparent or not.
0x34454C524Alias for BI_RLE4
0x38454C528Alias for BI_RLE8

Bayer Data Formats


Recently, a collection of "Bayer" data formats have been registered. These encode images with only a single color sample at each pixel position and are frequently used in acquisition of digital images where the image is captured through a color filter array. It is not clear to me how these formats define the layout of the filter array used but it may be fair to assume that they relate to a commonly used Bayer pattern originally developed by Kodak which has builds an image out of 2x2 blocks containing green samples in the top left and bottom right positions, red in the top right and blue in the bottom left.

Silicon Imaging's web site offers further explanation here.

Label FOURCC in Hex Bits per pixel Description
BA81 0x 8 Raw Bayer data with 8 bits per sample
BYR1 0x 8 Raw Bayer data with 8 bits per sample. May be a duplicate of BA81?
BYR2 0x 16 Raw Bayer data with 12 bit precision samples stored in 16 bit words.