Example #1
0
int PackedDibGetNumColors (BITMAPINFO * pPackedDib) {
	int iNumColors;
	iNumColors = PackedDibGetColorsUsed (pPackedDib);

	if (iNumColors == 0&& PackedDibGetBitCount (pPackedDib) < 16)
		iNumColors = 1 << PackedDibGetBitCount (pPackedDib);

	return iNumColors;
}
Example #2
0
int PackedDibGetRowLength (BITMAPINFO * pPackedDib)
{
     return ((PackedDibGetWidth (pPackedDib) * 
              PackedDibGetBitCount (pPackedDib) + 31) & ~31) >> 3 ;
}