|
void S_RevColor(Graphics::TBitmap *Bmp)//图片反色
- o9 h* ^7 i9 W' w& \2 n{ 6 [: D, J) _& M$ _" [7 H
BYTE *ptr; " t8 ?" B- t9 E' x" ~9 R+ P
for (int y = 0; y < Bmp->Height; y++)
$ J6 l# g" [# u1 V/ i; X" y/ u{ ( [% H/ d2 ?' f$ E: z4 Z8 [4 V* ]
ptr =(BYTE *) Bmp->ScanLine[y]; . o7 W0 B- M. \( W
for (int x = 0; x < Bmp->Width*3; x+=3){ 3 ^; y3 Z) F; {6 e* t
ptr[x]=BYTE(255-ptr[x]); # V% q2 C% J: \
ptr[x+1]=BYTE(255-ptr[x+1]); $ ~' {8 l! U( `! s
ptr[x+2]=BYTE(255-ptr[x+2]);
; @+ V$ M3 f R# ~8 W( b! n}
/ j; {8 H. k& U} 0 ^7 \" {; b0 ]% ^
} |