void S_RevColor(Graphics::TBitmap *Bmp)//图片反色 2 P$ N( k, R( q6 [ { ' {' ]1 r3 c, B0 S" V2 K BYTE *ptr; for (int y = 0; y < Bmp->Height; y++) ' z1 o( z6 G3 O- B; O { ptr =(BYTE *) Bmp->ScanLine[y]; for (int x = 0; x < Bmp->Width*3; x+=3){ ( V( N9 @; D2 t( b ptr[x]=BYTE(255-ptr[x]); ptr[x+1]=BYTE(255-ptr[x+1]); ptr[x+2]=BYTE(255-ptr[x+2]); } } % w$ H+ N/ c6 U+ Q0 z }
| 欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) | Powered by Discuz! X2.5 |