struct rgbColor
{
BYTE Red;
BYTE Green;
BYTE Blue;
};
struct rgbColor MyRgbColor;
TColor ColorTemp;
Graphics::TBitmap *SrcBitmap=new Graphics::TBitmap;
Graphics::TBitmap *DrcBitmap=new Graphics::TBitmap;
int iX;
int iY;
void __fastcall TForm1::test1Click(TObject *Sender)
{
for(iX=0;iX <=Image1-> Width;iX++)
{
for(iY=0;iY <=Image1-> Height;iY++)
{
ColorTemp=Image1-> Canvas-> Pixels[iX][iY];
MyRgbColor.Red=GetRValue(ColorTemp);
MyRgbColor.Green=GetGValue(ColorTemp);
MyRgbColor.Blue=GetBValue(ColorTemp);
if(MyRgbColor.Red==255&&MyRgbColor.Green==0&&MyRgbColor.Blue==0)
// if(MyRgbColor.Red==MyRgbColor.Green&&MyRgbColor.Green==MyRgbColor.Blue&&MyRgbColor.Blue==MyRgbColor.Red)
// if(MyRgbColor.Red> =90&&MyRgbColor.Red <=242&&MyRgbColor.Green> =93&&MyRgbColor.Green <=255&&MyRgbColor.Blue> =0&&MyRgbColor.Blue <=170)
{
// Image1-> Canvas-> Pixels[iX][iY]=RGB(0,255,0);
// Image1-> Canvas-> Pixels[iX][iY]=RGB(MyRgbColor.Red,MyRgbColor.Green,MyRgbColor.Blue);
Image1-> Canvas-> Pixels[iX][iY]=RGB(MyRgbColor.Red,MyRgbColor.Green,MyRgbColor.Blue);
}
else
{
// Image1-> Canvas-> Pixels[iX][iY]=RGB(0,0,0);
Image1-> Canvas-> Pixels[iX][iY]=RGB(0,0,0);
}
}
Application-> ProcessMessages();
StatusBar1-> SimpleText=IntToStr(iX);
}
}
{
BYTE Red;
BYTE Green;
BYTE Blue;
};
struct rgbColor MyRgbColor;
TColor ColorTemp;
Graphics::TBitmap *SrcBitmap=new Graphics::TBitmap;
Graphics::TBitmap *DrcBitmap=new Graphics::TBitmap;
int iX;
int iY;
void __fastcall TForm1::test1Click(TObject *Sender)
{
for(iX=0;iX <=Image1-> Width;iX++)
{
for(iY=0;iY <=Image1-> Height;iY++)
{
ColorTemp=Image1-> Canvas-> Pixels[iX][iY];
MyRgbColor.Red=GetRValue(ColorTemp);
MyRgbColor.Green=GetGValue(ColorTemp);
MyRgbColor.Blue=GetBValue(ColorTemp);
if(MyRgbColor.Red==255&&MyRgbColor.Green==0&&MyRgbColor.Blue==0)
// if(MyRgbColor.Red==MyRgbColor.Green&&MyRgbColor.Green==MyRgbColor.Blue&&MyRgbColor.Blue==MyRgbColor.Red)
// if(MyRgbColor.Red> =90&&MyRgbColor.Red <=242&&MyRgbColor.Green> =93&&MyRgbColor.Green <=255&&MyRgbColor.Blue> =0&&MyRgbColor.Blue <=170)
{
// Image1-> Canvas-> Pixels[iX][iY]=RGB(0,255,0);
// Image1-> Canvas-> Pixels[iX][iY]=RGB(MyRgbColor.Red,MyRgbColor.Green,MyRgbColor.Blue);
Image1-> Canvas-> Pixels[iX][iY]=RGB(MyRgbColor.Red,MyRgbColor.Green,MyRgbColor.Blue);
}
else
{
// Image1-> Canvas-> Pixels[iX][iY]=RGB(0,0,0);
Image1-> Canvas-> Pixels[iX][iY]=RGB(0,0,0);
}
}
Application-> ProcessMessages();
StatusBar1-> SimpleText=IntToStr(iX);
}
}