BMUTIL Sample Application ------------------------- BMUTIL demonstrates various bitmap-manipulation techniques, including: 1. Creating a "Gray" or "Disabled" bitmap from a color bitmap. This might be used for disabling a button on the fly which was painted with a bitmap, or disabling any bitmap. 2. Changing a single color in a bitmap without affecting any other colors. This is implemented completely using BitBlt(), and various Raster-Operation (ROP) codes. 3. Swapping two colors in a bitmap without affecting any other colors. This is also implemented with BitBlt() and some special ROP codes. 4. Dithering a color bitmap to a monochrome bitmap. This is done using DIBs, and operates directly on the DIB bits, so it's also very fast. This sample uses the Windows 3.1 Common Dialogs, so you must have the Windows 3.1 SDK to compile it. DIBAPI.DLL ---------- This sample uses functions from the DIBAPI Library. This library was written by Microsoft Developer Support, and contains routines which handle common DIB operations, like Loading from a .BMP file and converting between DIBs (Device-independent bitmaps) and DDBs (Device-dependent bitmaps). Since the intent of this sample is to demonstrate the 4 bitmap manipulation techniques mentioned above rather than the DIB techniques contained in the DIBAPI library, the library is provided with this sample in binary form only (as a DLL -- DIBAPI.DLL). The source for DIBAPI.DLL can be found as a part of the WINCAP sample (version 3.10), available in the Microsoft Software Library. Note that the DIBAPI.DLL library is only available in the newest version of WINCAP -- if you have the older version (version 3.00), you'll have to download the new version. FILES ----- The following files are contained in this sample: bmutil.c - Main source file colorchg.c - Contains routines to change/swap bitmap colors disabled.c - Routines to create a "disabled" bitmap dither.c - Routines to dither a bitmap dither.txt - Document describing dithering techniques (public domain) readme.txt - This file dibapi.h - Header file for DIBAPI.DLL dibapi.lib - Import library to use DIBAPI.DLL dibapi.dll - The library of DIBAPI functions dibapi.hlp - Help file containing information on using DIBAPI functions dibapi.txt - Text file with same info as Help file eagle.bmp - Sample 16-color DIB. Works great with "gray bitmap" menu item sunset.bmp - Sample 256-color DIB Mark Bader 3/27/92