void S_RevColor(Graphics::TBitmap *Bmp)//图片反色
{
BYTE *ptr;
for (int y = 0; y < Bmp->Height; y++)
{
ptr =(BYTE *) Bmp->ScanLine[y];
for (int x = 0; x < Bmp->Width*3; x+=3)
{
ptr[x]=BYTE(255-ptr[x]);
ptr[x+1]=BYTE(255-ptr[x+1]);
ptr[x+2]=BYTE(255-ptr[x+2]);
}
}
}
时间: 2024-09-30 04:47:28