~ubuntu-branches/ubuntu/hoary/devil/hoary

« back to all changes in this revision

Viewing changes to src-IL/include/il_bmp.h

  • Committer: Bazaar Package Importer
  • Author(s): Marcelo E. Magallon
  • Date: 2005-01-03 19:57:42 UTC
  • Revision ID: james.westby@ubuntu.com-20050103195742-4ipkplcwygu3irv0
Tags: upstream-1.6.7
ImportĀ upstreamĀ versionĀ 1.6.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//-----------------------------------------------------------------------------
 
2
//
 
3
// ImageLib Sources
 
4
// Copyright (C) 2000-2002 by Denton Woods
 
5
// Last modified: 09/01/2003 <--Y2K Compliant! =]
 
6
//
 
7
// Filename: src-IL/include/il_bmp.h
 
8
//
 
9
// Description: Reads and writes to a bitmap (.bmp) file.
 
10
//
 
11
//-----------------------------------------------------------------------------
 
12
 
 
13
 
 
14
#ifndef BMP_H
 
15
#define BMP_H
 
16
 
 
17
#include "il_internal.h"
 
18
 
 
19
 
 
20
#ifdef _WIN32
 
21
        #pragma pack(push, bmp_struct, 1)
 
22
#endif
 
23
typedef struct BMPHEAD
 
24
{
 
25
        ILushort        bfType;
 
26
        ILint           bfSize;
 
27
        ILuint          bfReserved;
 
28
        ILint           bfDataOff;
 
29
        ILint           biSize;
 
30
        ILint           biWidth;
 
31
        ILint           biHeight;
 
32
        ILshort         biPlanes;
 
33
        ILshort         biBitCount;
 
34
        ILint           biCompression;
 
35
        ILint           biSizeImage;
 
36
        ILint           biXPelsPerMeter;
 
37
        ILint           biYPelsPerMeter;
 
38
        ILint           biClrUsed;
 
39
        ILint           biClrImportant;
 
40
} IL_PACKSTRUCT BMPHEAD;
 
41
 
 
42
typedef struct OS2_HEAD
 
43
{
 
44
        // Bitmap file header.
 
45
        ILushort        bfType;
 
46
        ILuint          biSize;
 
47
        ILshort         xHotspot;
 
48
        ILshort         yHotspot;
 
49
        ILuint          DataOff;
 
50
 
 
51
        // Bitmap core header.
 
52
        ILuint          cbFix;
 
53
        //2003-09-01: changed cx, cy to ushort according to MSDN
 
54
        ILushort                cx;
 
55
        ILushort                cy;
 
56
        ILushort        cPlanes;
 
57
        ILushort        cBitCount;
 
58
} IL_PACKSTRUCT OS2_HEAD;
 
59
#ifdef _WIN32
 
60
        #pragma pack(pop, bmp_struct)
 
61
#endif
 
62
 
 
63
// Internal functions
 
64
ILboolean       iGetBmpHead(BMPHEAD *Header);
 
65
ILboolean       iGetOS2Head(OS2_HEAD *Header);
 
66
ILboolean       iIsValidBmp(ILvoid);
 
67
ILboolean       iCheckBmp(BMPHEAD *Header);
 
68
ILboolean       iCheckOS2(OS2_HEAD *Header);
 
69
ILboolean       iLoadBitmapInternal(ILvoid);
 
70
ILboolean       iSaveBitmapInternal(ILvoid);
 
71
ILboolean       ilReadUncompBmp(BMPHEAD *Info);
 
72
ILboolean       ilReadRLE8Bmp(BMPHEAD *Info);
 
73
ILboolean       ilReadRLE4Bmp(BMPHEAD *Info);
 
74
ILboolean       iGetOS2Bmp(OS2_HEAD *Header);
 
75
 
 
76
#endif//BMP_H