• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reading .BMPs the hard way
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Reading .BMPs the hard way
      • From: Alexander Griekspoor <email@hidden>
References: 
 >Reading .BMPs the hard way (From: Alexander Griekspoor <email@hidden>)

  • Prev by Date: Reading .BMPs the hard way
  • Next by Date: Re: Reading .BMPs the hard way
  • Previous by thread: Reading .BMPs the hard way
  • Next by thread: Re: Reading .BMPs the hard way
  • Index(es):
    • Date
    • Thread