Mail Archives: djgpp/1999/10/12/00:46:16
----------------- mailto:K DOT Rdt AT TU-Berlin DOT DE start -------------------
Hello!
Trying to understand the bmp-file-format I found in bmp.c(allegro)
the following; perhaps a non-effective error - but why does the
type of bfType isn't unsigned short?
^^^^^^^^^^^^^^
typedef struct BITMAPFILEHEADER
{
unsigned long bfType;
^^^^^^^^^^^^^^^^^^^^^
unsigned long bfSize;
unsigned short bfReserved1;
unsigned short bfReserved2;
unsigned long bfOffBits;
} BITMAPFILEHEADER;
...
int save_bmp(char *filename, BITMAP *bmp, RGB *pal)
{
...
/* file_header */
pack_iputw(0x4D42, f); /* bfType ("BM") */
^^^^^^^^^^^^^^^^^ ^^
pack_iputl(bfSize, f); /* bfSize */
pack_iputw(0, f); /* bfReserved1 */
pack_iputw(0, f); /* bfReserved2 */
Klaus.
----------------- mailto:K DOT Rdt AT TU-Berlin DOT DE !end! -------------------
- Raw text -