Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2 > #23423
| Newsgroups | comp.sys.apple2 |
|---|---|
| Date | 2015-01-05 15:38 -0800 |
| References | <f98e29a8-cb15-4742-ada1-8c5ff07076c6@googlegroups.com> <e9e0877f-1750-42c1-bee3-a3a17e14b9cb@googlegroups.com> <m7op9u$p79$1@speranza.aioe.org> <24a2b16b-d9af-45cf-af3e-258fe4ee17d5@googlegroups.com> <m8egbh$g9k$1@dont-email.me> |
| Message-ID | <d43efc35-e628-4f91-b148-399030e4f18a@googlegroups.com> (permalink) |
| Subject | Re: Templates wanted! |
| From | "Michael 'AppleWin Debugger Dev'" <michael.pohoreski@gmail.com> |
On Monday, January 5, 2015 9:07:24 AM UTC-8, Scott Alfter wrote:
> If you
> don't have BITMAPFILEHEADER and BITMAPINFOHEADER defined for you already
> (you probably don't if you're not compiling for Windows), you can
> copy-and-paste from these definitions:
>
> http://msdn.microsoft.com/en-us/library/windows/desktop/dd183374%28v=vs.85%29.aspx
> http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376%28v=vs.85%29.aspx
IMHO, those are shitty definitions.
From my 'hgr2rgb' project:
https://github.com/Michaelangel007/hgr2rgbntsc/blob/master/src/main.cpp
#include <stdint.h>
#if defined(_MSC_VER)
#define PACKED
#pragma pack(push,1)
#endif
#if defined(__GNUC__)
#define PACKED __attribute__ ((__packed__))
#endif
struct WinBmpHeader_t
{
// BITMAPFILEHEADER // Addr Size
uint8_t nCookie[2] ; // 0x00 0x02 BM
int32_t nSizeFile ; // 0x02 0x04 0 = ignore
int16_t nReserved1 ; // 0x06 0x02
int16_t nReserved2 ; // 0x08 0x02
int32_t nOffsetData ; // 0x0A 0x04
// == 0x0D (14)
// BITMAPINFOHEADER
int32_t nStructSize ; // 0x0E 0x04 biSize
int32_t nWidthPixels ; // 0x12 0x04 biWidth
int32_t nHeightPixels ; // 0x16 0x04 biHeight
int16_t nPlanes ; // 0x1A 0x02 biPlanes
int16_t nBitsPerPixel ; // 0x1C 0x02 biBitCount
int32_t nCompression ; // 0x1E 0x04 biCompression 0 = BI_RGB
int32_t nSizeImage ; // 0x22 0x04 0 = ignore
int32_t nXPelsPerMeter ; // 0x26 0x04
int32_t nYPelsPerMeter ; // 0x2A 0x04
int32_t nPaletteColors ; // 0x2E 0x04
int32_t nImportantColors; // 0x32 0x04
// == 0x28 (40)
// RGBQUAD
// pixelmap
} PACKED;
#ifdef _MSC_VER
#pragma pack(pop)
#endif // _MSC_VER
Back to comp.sys.apple2 | Previous | Next — Previous in thread | Next in thread | Find similar
Templates wanted! Harry Potter <rose.joseph12@yahoo.com> - 2014-12-27 04:53 -0800
Re: Templates wanted! "Bill Buckels" <bbuckels@mts.net> - 2014-12-27 18:07 -0600
Re: Templates wanted! osgeld@cheesefactory.us - 2014-12-28 01:08 -0800
Re: Templates wanted! Harry Potter <rose.joseph12@yahoo.com> - 2014-12-28 03:08 -0800
Re: Templates wanted! "Bill Buckels" <bbuckels@mts.net> - 2014-12-28 08:30 -0600
Re: Templates wanted! "Bill Buckels" <bbuckels@mts.net> - 2014-12-28 05:24 -0600
Re: Templates wanted! Harry Potter <rose.joseph12@yahoo.com> - 2014-12-28 03:57 -0800
Re: Templates wanted! scott@alfter.diespammersdie.us (Scott Alfter) - 2015-01-05 17:06 +0000
Re: Templates wanted! "Michael 'AppleWin Debugger Dev'" <michael.pohoreski@gmail.com> - 2015-01-05 15:38 -0800
Re: Templates wanted! Harry Potter <rose.joseph12@yahoo.com> - 2015-01-05 16:05 -0800
Re: Templates wanted! D Finnigan <dog_cow@macgui.com> - 2015-01-07 19:01 +0000
Re: Templates wanted! Harry Potter <rose.joseph12@yahoo.com> - 2015-01-07 12:15 -0800
Re: Templates wanted! Harry Potter <rose.joseph12@yahoo.com> - 2014-12-28 03:04 -0800
Re: Templates wanted! "Michael 'AppleWin Debugger Dev'" <michael.pohoreski@gmail.com> - 2014-12-30 11:13 -0800
Re: Templates wanted! "Bill Buckels" <bbuckels@mts.net> - 2014-12-30 13:24 -0600
csiph-web