PARSEBIT.EXE Directly Accesses the Bits of a DIB SectionLast reviewed: December 5, 1996Article ID: Q159649 |
The information in this article applies to:
SUMMARYPARSEBIT 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.
MORE INFORMATIONAfter 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. The following files are a part of the PARSEBIT sample:
ARTICLE-ID: Q119591 TITLE : How to Obtain Microsoft Support Files from Online Services REFERENCESFor more information on the structure of the various DIB formats, please see the following article in the Microsoft Knowledge Base:
ARTICLE_ID: Q94326 TITLE : SAMPLE: 16 and 32 Bits-Per-Pel Bitmap Formats |
KBCategory: kbprg kbgraphic kbfile kbhowto
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |