MergeDIB: Merges a Primary DIB with a Secondary DIB

MergeDIB merges a primary device-independent bitmap (DIB)
(with any palette) and a secondary DIB (with a different
palette) into a single DIB (with a special palette).

The special DIB and palette combine the two images and
palettes so that when the palette is gradually cross-faded
(animated), the first and second DIB are partially
displayed. At complete fadeout, only one bitmap is
visible; at a 50-50 mix, both bitmaps are equally visible
(merged). Pixels are not dithered between the images, but
are mixed in the palettes.

In MergeDIB, the two DIBs must be the same size. You can
eliminate this limitation easily by using the DIB driver:
Create an artificial bitmap in the desired size with a
blank background (where "blank" is a chosen color), and
center or otherwise place the smaller image in the
background.

KEYWORDS: PR-CD2; CreatePalette; SelectPalette;
RealizePalette; GetDeviceCaps; GetSystemPaletteUse;
GetSystemPaletteEntries; GetStockObject;
CreateCompatibleDC; GetDIBits; PaletteSize; CreateBitmap;
CreateDIBitmap; CreateDibPalette; GetNearestPaletteIndex;
GetPaletteEntries; SetPaletteEntries; StretchBlt; BitBlt;
StretchDIBits; PatBlt; SetDIBitsToDevice
