EVALUATION
The explanation of BITMAPINFOHEADER in Microsoft Platform SDK says,
biClrUsed :
---------------------------------------------------------------------
Specifies the number of color indexes in the color table
that are actually used by the bitmap.
If this value is zero, the bitmap uses the maximum number of colors
corresponding to the value of the biBitCount member for
the compression mode specified by biCompression.
If biClrUsed is nonzero and the biBitCount member is less than 16,
the biClrUsed member specifies the actual number of colors
the graphics engine or device driver accesses.
...
--------------------------------------------------------------------
The number of bits are 4bits and 8 bits for 16 colors and 256 colors respectively.
( 4 bits = 16 colors and 8bits = 256colors)
However, 1 << (pSrcBmih->biBitCount - 1) seems 1 bit less shift distance.
|