void S_RevColor(Graphics::TBitmap *Bmp)//图片反色 9 c5 I8 y; x5 w; Z k& H { - |$ I( D J$ ~2 v BYTE *ptr; for (int y = 0; y < Bmp->Height; y++) 0 j/ e2 S4 c: H5 w1 L' G8 S { & i" d+ j0 t: l a6 ^0 |7 C2 s ptr =(BYTE *) Bmp->ScanLine[y]; for (int x = 0; x < Bmp->Width*3; x+=3){ ' h7 a3 p: v* L) s2 g' S ptr[x]=BYTE(255-ptr[x]); ptr[x+1]=BYTE(255-ptr[x+1]); ptr[x+2]=BYTE(255-ptr[x+2]); } } }
| 欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) | Powered by Discuz! X2.5 |