|
void S_RevColor(Graphics::TBitmap *Bmp)//图片反色 ( F% Z3 d4 x, v, n
{ / q% d( L; ]8 _" ` f6 S* w8 U
BYTE *ptr; 2 _' u6 g! Y, \* {1 C3 [
for (int y = 0; y < Bmp->Height; y++) 5 O, s5 y# k% k' r6 T" D
{
L% n; C( C. w& ]2 F4 W3 xptr =(BYTE *) Bmp->ScanLine[y];
5 H! Q1 n- A2 {* u& {for (int x = 0; x < Bmp->Width*3; x+=3){ 3 }6 ?% x7 o; T! x
ptr[x]=BYTE(255-ptr[x]);
, u) T# E! A, y* t) d* N! Cptr[x+1]=BYTE(255-ptr[x+1]);
/ z$ B; S4 l, ? j( K& Vptr[x+2]=BYTE(255-ptr[x+2]);
9 o% u8 f. ]3 ^# J7 W Y}
% t" Z1 B0 p5 V* H% _ I3 u} $ ], s5 \+ z+ z4 {
} |