At 4/27/2004 10:33 AM, Paul Grenyer wrote:

>>      typedef unsigned char    Data8;
>>        Data8* mpBMIBuffer;
>>
>>
>>        int nBitMapInfoSize;
>>        BITMAPINFO* pBMI;
>>        int nNumColors = 8;
>>        nBitMapInfoSize = sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * nNumColors;
>>        mpBMIBuffer = new Data8[nBitMapInfoSize];
>>        pBMI = (BITMAPINFO*)mpBMIBuffer;
>
>This is A LOT of extra code to get to Max's solution don't you think,
>Phil?

Not if it's in a function that can create all different kinds of BITMAPs.

I simplified it some.

I think clarity is more important than fewest lines of code.

Phil Daley          < AutoDesk >
http://www.conknet.com/~p_daley







Reply via email to