Device Independence—What's It Good For?
Transferring color bitmaps from one device to another was not possible in versions of the Microsoft® Windows™ graphical environment earlier than 3.0. With DIBs, each device displays the image to the ability of its color resolution. An application can store an image in the DIB format and then display it, regardless of the output device; an application need no longer create a version of each image for each type of device.
This image transfer ability can be used to print halftone images. For example, the StretchDIBits function can pass a DIB directly to an intelligent printer driver. Given the full color information of the image instead of simply a monochrome version (the traditional method), the driver can use halftones to print a realistic picture.
Because the DIB format is publicly defined, an application can manipulate it on the fly. In fact, an application can build an image without any interaction with Windows. If Windows lacks a drawing primitive, the application can simulate it directly into the DIB instead of using the existing graphics device interface (GDI) primitives. Unfortunately, under Windows versions 3.0 and 3.1, GDI cannot perform output operations directly to a DIB.