title: Trying to understand bitmaps pixel by pixel
body: <p>Below is the hex data in the bitmap</p>
  
  <p>424d 46000000 0000 0000 3e000000 28000000 02000000 02000000 0100 0100 00000000 08000000    00000000 00000000 00000000 00000000 0000 0000 ffff ff00 c000 0000 0000 0000</p>
  
  <p>I need to understand what all the values represent and most specifically the pixel values.  This is a bitmap saved with mspaint and it's a monochrome bitmap.  Below is my understanding/misunderstanding...most of this is info you get from wiki and search bmp. This is just me trying to break down my bmp which has two black pixels on the top and two white pixels on the bottom.</p>
  
  <pre><code>42 4d       is BM
  46 00 00 00 size of entire file
  00 00       reserved 1
  00 00       reserved 2
  3e 00 00 00 offset to where pixel data can be found
  
  28 00 00 00 # of bytes in this header
  02 00 00 00 width of bmp
  02 00 00 00 height of bmp
  01 00       # of planes
  01 00       # of bits per pixel
  00 00 00 00 compression
  08 00 00 00 size of raw data in pixel array in bytes
  00 00 00 00 horizontal resolution pix/m
  00 00 00 00 vertical resolution pix/m
  00 00 00 00 number of colors
  00 00 00 00 important colors
  00 00 00 00  x=1 y=2  pixel value?  is supposed to be white
  ff ff ff 00  x=2 y=2  pixel value?  is supposed to be white
  c0 00 00 00  x=1 y=1  pixel value?  is supposed to be black
  00 00 00 00  x=2 y=1  pixel value?  is supposed to be black
  </code></pre>
  
  <p>The last pixel values is really confusing i don't see how they would equal what they are supposed to equal plus I thought rgb or bgr data is just 3 bytes?  Also the offset to where pixel data can be found goes 2 bytes past the last byte in the bitmap...I feel like I'm decoding it completely wrong or something.</p>