代码解释 ,求助???
《一》int Height=this.pictureBox1.Image.Height;int Width=this.pictureBox1.Image.Width;
Bitmap bitmap=new Bitmap(Width,Height);
Bitmap MyBitmap=(Bitmap)this.pictureBox1.Image;
Color pixel;
for(int x=1;x<Width;x++)
{
for(int y=1;y<Height;y++)
{
int r,g,b;
pixel=MyBitmap.GetPixel(x,y);
r=255-pixel.R;
g=255-pixel.G;
b=255-pixel.B;
bitmap.SetPixel(x,y,Color.FromArgb(r,g,b));
}
}
《二》 int iWidth=this.pictureBox1.Width;
int iHeight=this.pictureBox1.Height;
Graphics g=this.pictureBox1.CreateGraphics();
g.Clear(Color.Gray);
for(int y=0;y<iHeight;y++)
{
g.DrawImage(MyBitmap,0,0,iWidth,y);
}
这些代码是啥意思呀??我不明白···,请大家帮助一下,最好详细一些,毕竟我是不明白的···