A Library for DIBs

It is only now—after our long journey learning about GDI bitmap objects, the device-independent bitmap, the DIB section, and the Windows Palette Manager—that we’re ready to devise some set of functions that help us in working with bitmaps.

The PACKEDIB files shown earlier illustrate one possible approach: A packed DIB in memory is represented solely by a pointer to it. All the information that a program needs about the DIB can be obtained by functions that access the header information structure. In practice, however, this method has serious performance problems when it comes to “get pixel” and “set pixel” routines. Image-processing tasks routinely require bitmap bits to be accessed, and these functions should ideally be as fast ...

Get Programming Windows®, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.