Re: Reading .BMPs the hard way
Re: Reading .BMPs the hard way
- Subject: Re: Reading .BMPs the hard way
- From: Matt Gough <email@hidden>
- Date: Fri, 18 Mar 2005 09:50:44 +0000
On 18 Mar 2005, at 09:26, Alexander Griekspoor wrote:
The struct that I defined:
typedef struct tagWINBITMAPFILEHEADER
{
short bfType;
int bfSize;
short bfReserved1;
short bfReserved2;
int bfOffBits;
} WINBITMAPFILEHEADER;
I suspect that the struct is being padded after bfType and you end up with one whose sizeof is not 14. My guess is that sizeof(WINBITMAPFILEHEADER) is returning 16 in your case.
try wrapping its definition with
<x-tad-smaller>#pragma options align=mac68k</x-tad-smaller><x-tad-smaller>
</x-tad-smaller> typedef struct tagWINBITMAPFILEHEADER
{
short bfType;
int bfSize;
short bfReserved1;
short bfReserved2;
int bfOffBits;
} WINBITMAPFILEHEADER;
<x-tad-smaller>
</x-tad-smaller><x-tad-smaller>#pragma options align=reset</x-tad-smaller><x-tad-smaller>
Matt Gough</x-tad-smaller> _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden