EMGU - Image的畫面縮放 - 延伸應用 2. 讀圖片時將 ImageBox 的大小設定成圖片大小

讀檔案→設定ImageBox 大小→放入 Image

讀檔案→設定ImageBox 大小→放入 Image

        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);


                imageBox1.Size = LoadImage.Size;


                imageBox1.Image = LoadImage;
                imageBox1.FunctionalMode = ImageBox.FunctionalModeOption.Minimum;

            }
        }