Did you try reading your file in hex mode to see just what you should be seing?

AFAIK, a lot of bitmap files per-pixel pad to 4 bytes (rather than per row). You may want to double check your file using an external hex editor.

You could also try something simpler: Forget everything about bitmaps, and imagine your file is just plain raw data. Try to read that and print the values. Your success (or failure) of achieving this should give you a good idea of where you went wrong.