From: kagel AT quasar DOT bloomberg DOT com Date: Tue, 20 Aug 1996 13:06:43 -0400 Message-Id: <9608201706.AA02849@quasar.bloomberg.com > To: tomw AT tsys DOT demon DOT co DOT uk Cc: djgpp AT delorie DOT com In-Reply-To: <9608201324.AA02684@quasar.bloomberg.com > (kagel@quasar) Subject: Re: strange problem reading binary files --- OOOPPPSSSie!!!! Reply-To: kagel AT dg1 DOT bloomberg DOT com typedef struct tagBITMAPFILEHEADER { /* bmfh */ UINT bfType; DWORD bfSize __attribute__ ((packed));/* OOPPS remove this attribute */ UINT bfReserved1; UINT bfReserved2; DWORD bfOffBits __attribute__ ((packed)); /* This one also */ } BITMAPFILEHEADER; typedef struct tagBITMAPINFOHEADER { /* bmih */ DWORD biSize; LONG biWidth; LONG biHeight; WORD biPlanes; WORD biBitCount; DWORD biCompression; DWORD biSImage; LONG biXPelsPerMeter; LONG biYPelsPerMeter; DWORD biClrUsed; DWORD biClrImportant; } BITMAPINFOHEADER; typedef struct A_tagBITMAPFILEHEADER { /* bmfh */ UINT bfType; DWORD bfSize __attribute__ ((packed)); UINT bfReserved1; UINT bfReserved2; DWORD bfOffBits __attribute__ ((packed)); } A_BITMAPFILEHEADER; Obviously, or maybe not so obviously, my intent was to pack the A_tagBITMAPFILEHEADER structure but not the original tagBITMAPFILEHEADER structure. I hope that that came though in spite of my typo. I appologize if my orignal response caused you any confusion. -- Art S. Kagel, kagel AT quasar DOT bloomberg DOT com A proverb is no proverb to you 'till life has illustrated it. -- John Keats