当前位置:天才代写 > tutorial > C语言/C++ 教程 > 图片反色的一段措施

图片反色的一段措施

2017-11-05 08:00 星期日 所属: C语言/C++ 教程 浏览:452

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]);
   }
  }
}

 

    关键字:

[contact-form-7 id="17097" title="form2"]天才代写-代写联系方式