/usr/include/leptonica/bmp.h is in libleptonica-dev 1.69-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | /*====================================================================*
- Copyright (C) 2001 Leptonica. All rights reserved.
- This software is distributed in the hope that it will be
- useful, but with NO WARRANTY OF ANY KIND.
- No author or distributor accepts responsibility to anyone for the
- consequences of using this software, or for whether it serves any
- particular purpose or works at all, unless he or she says so in
- writing. Everyone is granted permission to copy, modify and
- redistribute this source code, for commercial or non-commercial
- purposes, with the following restrictions: (1) the origin of this
- source code must not be misrepresented; (2) modified versions must
- be plainly marked as such; and (3) this notice may not be removed
- or altered from any source or modified source distribution.
*====================================================================*/
#ifndef LEPTONICA_BMP_H
#define LEPTONICA_BMP_H
/*
* This file is here to describe the fields in the header of
* the BMP file. These fields are not used directly in Leptonica.
* The only thing we use are the sizes of these two headers.
* Furthermore, because of potential namespace conflicts with
* the typedefs and defined sizes, we have changed the names
* to protect anyone who may also need to use the original definitions.
* Thanks to J. D. Bryan for pointing out the potential problems when
* developing on Win32 compatible systems.
*/
/*-------------------------------------------------------------*
* BMP file header *
*-------------------------------------------------------------*/
struct BMP_FileHeader
{
l_int16 bfType; /* file type; must be "BM" */
l_int16 bfSize; /* length of the file;
sizeof(BMP_FileHeader) +
sizeof(BMP_InfoHeader) +
size of color table +
size of DIB bits */
l_int16 bfFill1; /* remainder of the bfSize field */
l_int16 bfReserved1; /* don't care (set to 0)*/
l_int16 bfReserved2; /* don't care (set to 0)*/
l_int16 bfOffBits; /* offset from beginning of file */
l_int16 bfFill2; /* remainder of the bfOffBits field */
};
typedef struct BMP_FileHeader BMP_FH;
#define BMP_FHBYTES sizeof(BMP_FH)
/*-------------------------------------------------------------*
* BMP info header *
*-------------------------------------------------------------*/
struct BMP_InfoHeader
{
l_int32 biSize; /* size of the BMP_InfoHeader struct */
l_int32 biWidth; /* bitmap width in pixels */
l_int32 biHeight; /* bitmap height in pixels */
l_int16 biPlanes; /* number of bitmap planes */
l_int16 biBitCount; /* number of bits per pixel */
l_int32 biCompression; /* compression format (0 == uncompressed) */
l_int32 biSizeImage; /* size of image in bytes */
l_int32 biXPelsPerMeter; /* pixels per meter in x direction */
l_int32 biYPelsPerMeter; /* pixels per meter in y direction */
l_int32 biClrUsed; /* number of colors used */
l_int32 biClrImportant; /* number of important colors used */
};
typedef struct BMP_InfoHeader BMP_IH;
#define BMP_IHBYTES sizeof(BMP_IH)
#endif /* LEPTONICA_BMP_H */
|