PARSEBIT.exe Directly Accesses the Bits of DIB SectionID: Q159649
|
PARSEBIT demonstrates how to programmatically parse through the bits of DIB sections by performing a conversion from a hi/true color DIB section to an 8 bpp DIB section. Directly manipulating the bits of a DIB section can be very useful in situations where using Windows GDI to manipulate the bits is too slow. is a that .
The following file is available for download from the Microsoft Software Library:
~ PARSEBIT.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 ServicesAfter you build the sample, run it, and then load a large BMP file. Once the file is loaded into a DIB section, you have two options for displaying it: use the Windows GDI to convert it via a BitBlt() or use the code in the sample to convert it. Both of these options can be selected from the "Display" menu. After you make your selection, the program will time how long it takes to display the bitmap using the selected method. On Windows 95, the difference between the two methods will be minimal because Windows 95 uses a similar optimization. However, on Windows NT, you'll probably find that the code in the sample is quite a bit faster than the BitBlt() provided by the OS.
For additional information about the structure of the various DIB formats, please see the following article(s) in the Microsoft Knowledge Base:
Q94326 SAMPLE: 16 and 32 Bits-Per-Pel Bitmap Formats
Additional query words:
Keywords : kbfile kbgraphic kbNTOS351 kbNTOS400 kbSDKWin32 kbWinOS95 kbDSupport
Version : winnt:3.51,4.0
Platform : winnt
Issue type : kbinfo
Last Reviewed: July 14, 1999