Take care of the stride? For example, the bimap is 8 bit per pixel, and 10*10 in size. It is not neccesarry that every line contains 8*10 bits. You might use stride to locate the pixel in the bitmap data. MSDN: GDI+ BitmapData Stride INT Offset, in bytes, between consecutive scan lines of the bitmap. If the stride is positive, the bitmap is top-down. If the stride is negative, the bitmap is bottom-up.
system