# bmp-internal.h

Go to the documentation of this file.

    00001 ///
    00002 /// \file       bmp-internal.h
    00003 ///             BMP structures
    00004 ///
    00005
    00006 /*
    00007     Copyright (C) 2008-2009, Nicolas VIVIEN
    00008     See also:
    00009                 http://www.fortunecity.com/skyscraper/windows/364/bmpffrmt.html
    00010
    00011     This program is free software; you can redistribute it and/or modify
    00012     it under the terms of the GNU General Public License as published by
    00013     the Free Software Foundation; either version 2 of the License, or
    00014     (at your option) any later version.
    00015
    00016     This program is distributed in the hope that it will be useful,
    00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    00019
    00020     See the GNU General Public License in the COPYING file at the
    00021     root directory of this project for more details.
    00022 */
    00023
    00024
    00025 #ifndef __BARRY_BMP_INTERNAL_H__
    00026 #define __BARRY_BMP_INTERNAL_H__
    00027
    00028 #include "dll.h"
    00029 #include <stdint.h>
    00030 #include <sys/types.h>
    00031
    00032 typedef struct BXLOCAL {
    00033         char bfType[2];                         // Contains always 'BM'
    00034         uint32_t bfSize;                        // Size of file
    00035         uint16_t bfReserved1;                   // 0x00
    00036         uint16_t bfReserved2;                   // 0x00
    00037         uint32_t bfOffBits;                     // Offset to find the raw data
    00038 } __attribute__ ((packed)) bmp_file_header_t;
    00039
    00040 typedef struct BXLOCAL {
    00041         uint32_t biSize;                        // Size of struct itself
    00042         uint32_t biWidth;                       // Width of image
    00043         uint32_t biHeight;                      // Height of image
    00044         uint16_t biPlanes;                      //
    00045         uint16_t biBitCount;                    //
    00046         uint32_t biCompression;                 //
    00047         uint32_t biSizeImage;                   // Size of raw data
    00048         uint32_t biXPelsPerMeter;               //
    00049         uint32_t biYPelsPerMeter;               //
    00050         uint32_t biClrUsed;                     //
    00051         uint32_t biClrImportant;                //
    00052 } __attribute__ ((packed)) bmp_info_header_t;
    00053
    00054 #endif
    00055