|
void S_RevColor(Graphics::TBitmap *Bmp)//图片反色 % S x$ e; `1 R" U
{ + F" c k4 ^( Y" t( ~' a
BYTE *ptr;
: W3 S1 A* o; K) h1 R& w2 j) Kfor (int y = 0; y < Bmp->Height; y++) . y/ Q- u7 f7 L5 C
{
, x9 a; m5 e d& `) Optr =(BYTE *) Bmp->ScanLine[y];
0 q/ ^- K* A/ |# G" M$ b$ G$ Vfor (int x = 0; x < Bmp->Width*3; x+=3){ ; l- k" K8 q* m' L5 y
ptr[x]=BYTE(255-ptr[x]); $ } Y/ v7 _8 W: `& E7 [& l
ptr[x+1]=BYTE(255-ptr[x+1]);
, N" g: V. P% V4 K6 V+ yptr[x+2]=BYTE(255-ptr[x+2]);
5 b) e6 L2 d8 g4 B}
! F- V; _2 W1 B' s5 U# Y, _} 3 H0 x6 S ], U! w- d _5 w
} |