Zadanie domowe a tu google wyłączyli.
http://en.wikipedia.org/wiki/BMP_file_format
EDIT:
Czy to jest naprawdę aż tak skomplikowane wykonać trzy mnożenia
2048 * 1700 * 3
i
2048 * 1700 * 2
Ach no i jeszcze 1 Mb = 1024 Kb a 1 Kb = 1024 bajty.
wrrrrrrrrrr.......