menu: added new Keywords tag to .desktop files
[barry.git] / src / bmp-internal.h
blob96df5459ade9d5761d66a26b529280e4588204dd
1 ///
2 /// \file bmp-internal.h
3 /// BMP structures
4 ///
6 /*
7 Copyright (C) 2008-2009, Nicolas VIVIEN
8 See also:
9 http://www.fortunecity.com/skyscraper/windows/364/bmpffrmt.html
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 See the GNU General Public License in the COPYING file at the
21 root directory of this project for more details.
25 #ifndef __BARRY_BMP_INTERNAL_H__
26 #define __BARRY_BMP_INTERNAL_H__
28 #include "dll.h"
29 #include <stdint.h>
30 #include <sys/types.h>
31 #include "platform.h" // safe to include platform.h here, since
32 // bmp-internal.h is not installed either
34 #if USE_PACK_PRAGMA
35 #pragma pack(push, 1)
36 #endif
38 typedef struct BXLOCAL {
39 char bfType[2]; // Contains always 'BM'
40 uint32_t bfSize; // Size of file
41 uint16_t bfReserved1; // 0x00
42 uint16_t bfReserved2; // 0x00
43 uint32_t bfOffBits; // Offset to find the raw data
44 } ATTRIBUTE_PACKED bmp_file_header_t;
46 typedef struct BXLOCAL {
47 uint32_t biSize; // Size of struct itself
48 uint32_t biWidth; // Width of image
49 uint32_t biHeight; // Height of image
50 uint16_t biPlanes; //
51 uint16_t biBitCount; //
52 uint32_t biCompression; //
53 uint32_t biSizeImage; // Size of raw data
54 uint32_t biXPelsPerMeter; //
55 uint32_t biYPelsPerMeter; //
56 uint32_t biClrUsed; //
57 uint32_t biClrImportant; //
58 } ATTRIBUTE_PACKED bmp_info_header_t;
60 #if USE_PACK_PRAGMA
61 #pragma pack(pop)
62 #endif
64 #endif