Printing Monochrome and Color Bitmaps from WindowsLast reviewed: November 2, 1995Article ID: Q64520 |
The information in this article applies to:
SUMMARYThe format of a display bitmap determines the procedure that an application uses to print it. The two display bitmap formats available under Windows are device-dependent bitmaps (DDBs) and device- independent bitmaps (DIBs). DIBs and DIB functions should be used for printing color bitmaps.
MORE INFORMATIONAn application can use the BitBlt() or StretchBlt() function to print or display a monochrome bitmap. Both printer drivers and display drivers can process monochrome DDBs. However, an application must account for the difference in resolution between a typical display and a typical laser printer. The StretchBlt() function enables an application to appropriately change the size of a monochrome bitmap. When the display bitmap is a color DDB, printing is more difficult because the display DDB format may not match the printer DDB format. Because Windows supports a wide variety of devices, this situation is quite common. When the formats DDB differ, the application must convert the display DDB into a print DDB or a DIB. DIBs are designed to ease the process of transferring images between devices. When an application uses a DIB, the GDI or the output driver performs any conversions required for the device. The ShowDIB sample application, provided in the Windows SDK and the Win32 SDK, demonstrates converting a DDB to a DIB and other common manipulations. The file DIB.C is of particular interest. It contains the functions that perform the manipulations. This code can be incorporated into other applications. For more information, please see the Windows SDK 3.1 DIBView sample or the Win32 SDK WinCap32 sample.
|
Additional reference words: 3.00 3.10 3.50 4.00 95
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |