Display an eight-bit indexed image by converting chunky pixel rows into
an owned BitMap during Setup. Supply Pixels, NumColors and inherited
Bitmap_Width/Bitmap_Height. Palette is optional; omitted palette data
leaves color interpretation to Bitmap and any separately supplied source
colors or mapping table.
The object retains borrowed pixel and palette pointers. Setup reads them
again on each setup cycle, allocates an intermediate bitmap and
optionally expands the byte palette to ULONG RGB channels. The bitmap
depth is the smallest value from one through eight that can hold
NumColors entries; even one color uses depth one. Pixel values must be
valid indices for the supplied color data.
Setup fails for NULL pixels, zero dimensions, a color count outside
1..256, or detected local allocation failure. It installs the bitmap and
optional expanded colors in Bitmap before calling superclass Setup. On
superclass failure it clears those installed pointers and frees the
local allocations. Bitmap remapping has its own failure behavior: TRUE
is not a guarantee that every remapping allocation succeeded.
Cleanup delegates first, then clears the installed bitmap pointer, waits
for blits, frees the owned bitmap and expanded palette, and clears their
fields. Use the normal Setup/Cleanup lifecycle. Dispose frees a
remaining owned bitmap but does not independently free palette32;
skipping Cleanup can leak the expanded palette and bypass superclass
resource cleanup.