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.

LabelFOURCC in HexBits per pixelDescription
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 2×2 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.

LabelFOURCC in HexBits per pixelDescription
BA810x8Raw Bayer data with 8 bits per sample
BYR10x8Raw Bayer data with 8 bits per sample. May be a duplicate of BA81?
BYR20x16Raw Bayer data with 12 bit precision samples stored in 16 bit words.

9 thoughts on “RGB pixel formats”

  1. bs8xv508

  2. Thanks on your marvelous posting! I really enjoyed reading it, you will be a great author.I will always bookmark your blog and definitely will come back later on. I want to encourage yourself to continue your great writing, have a nice afternoon!

  3. Great awesome issues here. I am very glad to see your article. Thank you so much and i’m having a look forward to contact you. Will you please drop me a e-mail?

  4. Hello, Neat post. There’s a problem with your site in internet explorer, might check this… IE still is the marketplace leader and a huge portion of folks will pass over your fantastic writing because of this problem.

  5. I believe this internet site has some real wonderful info for everyone. “Dealing with network executives is like being nibbled to death by ducks.” by Eric Sevareid.

Leave a Comment

Exit mobile version