请看以下代码
if (this->isPNG)
for (int i = 0; i < this->cImage.GetWidth(); i++)
{
for (int j = 0; j < this->cImage.GetHeight(); j++)
{
unsigned char* pucColor = reinterpret_cast<unsigned char *>(this->cImage.GetPixelAddress(i, j));
pucColor[0] = pucColor[0] * pucColor[3] / 255;
pucColor[1] = pucColor[1] * pucColor[3] / 255;
pucColor[2] = pucColor[2] * pucColor[3] / 255;
}
}
网友评论