CImage类中关于SetColorTable()的使用
void SetColorTable(
UINT iFirstColor,
UINT nColors,
const RGBQUAD* prgbColors
) throw( );
其中,如何设置 UINT iFirstColor 这个参数??
下面是用来取出图像中全部调色板单元数据
void GetAllPalette(CImage *pImg, RGBQUAD *ColorTab)
{
struct IMAGEPARAMENT P;
GetImageParament(pImg, &P);
pImg->GetColorTable(0, P.nNumColors, ColorTab);
}
现在我要编写一个用来存储全部调色板单元数据的函数,如下,各位看看可以么,给些意见:
void SetAllPalette(CImage *pImg, RGBQUAD *ColorTab)
{
struct IMAGEPARAMENT P;
GetImageParament(pImg, &P);
pImg ->SetColorTable(0, p.nNumColors, ColorTab);
}
感觉不怎么行,但又不知道怎么弄,各位帮忙下,看看该怎么写这个函数,谢谢~!