-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDIB.H
More file actions
40 lines (35 loc) · 1.56 KB
/
DIB.H
File metadata and controls
40 lines (35 loc) · 1.56 KB
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
/****************************************************************************\
*
* FILE: DIB.H
*
* PURPOSE: IconPro Project DIB handling header file
*
* COMMENTS: Icons are stored in something almost identical to DIB
* format, which makes it real easy to treat them as DIBs
* when manipulating them.
*
* Copyright 1995 Microsoft Corp.
*
*
* History:
* July '95 - Created
*
\****************************************************************************/
/****************************************************************************/
// local #defines
// How wide, in bytes, would this many bits be, DWORD aligned?
#define WIDTHBYTES(bits) ((((bits) + 31)>>5)<<2)
/****************************************************************************/
/****************************************************************************/
// Exported function prototypes
LPSTR FindDIBBits (LPSTR lpbi);
WORD DIBNumColors (LPSTR lpbi);
WORD PaletteSize (LPSTR lpbi);
DWORD BytesPerLine( LPBITMAPINFOHEADER lpBMIH );
LPBYTE ConvertDIBFormat( LPBITMAPINFO lpSrcDIB, UINT nWidth, UINT nHeight, UINT nColors, BOOL bStretch );
void SetMonoDIBPixel( LPBYTE pANDBits, DWORD dwWidth, DWORD dwHeight, DWORD x, DWORD y, BOOL bWhite );
LPBYTE ReadBMPFile( LPCTSTR szFileName );
BOOL WriteBMPFile( LPCTSTR szFileName, LPBYTE lpDIB );
INT32 InvertBmpLine( LPBYTE lpbi, DWORD dwBytesPerLine, DWORD dwBmpSize );
HANDLE MakeDib( HBITMAP hbitmap, UINT bits, HPALETTE hPalette );
/****************************************************************************/