You should not be doing an fread() before checking whether the file opened.
Type: Posts; User: nonoob
You should not be doing an fread() before checking whether the file opened.
You shouldn't use 'int' in the structs. The BMP file specification says dword which means 32 bit. It's better to use 'long' because 'int' may have different sizes depending on platform.
Also you...