日期:2014-05-16  浏览次数:20842 次

小白实习求帮助

裁剪pictureBox1里800*400的图片显示到pictureBox2里并保存
private void button1_Click(object sender, EventArgs e)
{
this.openFileDialog1.InitialDirectory = "F:\\pic";

if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
{
this.pictureBox1.ImageLocation = this.openFileDialog1.FileName;
}
// openFileDialog1.ShowDialog();
textBox1.Text = openFileDialog1.FileName;
}
private void button2_Click(object sender, EventArgs e)
{
}
------解决方案--------------------
google

Graphics.FromImage
Graphic.DrawImage
Image.Save