讀檔案→設定Image大小→放到 ImageBox 裡面
讀檔案→設定Image大小→放到 ImageBox 裡面
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog filename = new OpenFileDialog();
if (filename.ShowDialog() == DialogResult.OK)
{
textBox1.Text = filename.FileName;
Image<Gray, byte> LoadImage = new Image<Gray, byte>(filename.FileName);
Image<Gray, byte> OutImage = LoadImage.Resize(
(int)( (imageBox1.Size.Width)),
(int)( (imageBox1.Size.Height)), Inter.Linear);
imageBox1.Image = OutImage;
imageBox1.FunctionalMode = ImageBox.FunctionalModeOption.Minimum;
}
}