SeedIB.exe Shows 16 and 32 Bits-Per-Pel Bitmap FormatsID: Q94326
|
SeedIB.exe is a sample application that demonstrates how to load, display,
and save 1, 4, 8, 16, 24, and 32-bits-per-pixel (Device Independent Bitmap (DIB) formats. In addition, SeedIB.exe demonstrates a simple method of creating an optimized palette for displaying DIBs with more than 8-bits-per-pixel on 8-bits-per-pixel devices.
NOTE: To minimize color loss, SeeDIB uses CreateDIBSection() to do conversions between uncompressed DIBs which have more than 8-bits-per- pixel. This function is not available on Windows NT 3.1.
The following file is available for download from the Microsoft Software Library:
~ SeedIB.exeFor more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online ServicesFor DIBs, the 16 and 32-bit formats contain three DWORD masks in the bmiColors member of the BITMAPINFO structure. These masks specify which bits in the pel correspond to which color.
0x00007C00 red (0000 0000 0000 0000 0111 1100 0000 0000)
0x000003E0 green (0000 0000 0000 0000 0000 0011 1110 0000)
0x0000001F blue (0000 0000 0000 0000 0000 0000 0001 1111)
NOTE: For 16 bits-per-pel, the upper half of the DWORDs are always zeroed.
0x00FF0000 red (0000 0000 1111 1111 0000 0000 0000 0000)
0x0000FF00 green (0000 0000 0000 0000 1111 1111 0000 0000)
0x000000FF blue (0000 0000 0000 0000 0000 0000 1111 1111)
Resolution Bits Per Color Color Mask
-------------------------------------------------------------
16bpp 5,5,5 0x00007c00 0x000003e0 0x0000001f
16bpp 5,6,5 0x0000f800 0x000007e0 0x0000001f
32bpp 8,8,8 0x00ff0000 0x0000ff00 0x000000ff
User-defined color masks are not available under Windows 95.
Additional query words: bpp bmp
Keywords : kbfile kbsample kbBitmap kbGDI kbNTOS350 kbNTOS351 kbSDKWin32 kbWinOS95 kbDSupport
Version : winnt:3.5,3.51
Platform : winnt
Issue type : kbinfo
Last Reviewed: July 12, 1999