Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            /* 開啟檔案 */
            OpenorSavePicture m_openorsavepicture = new OpenorSavePicture();
            Bitmap            reg = m_openorsavepicture.OpenPicture();

            //放上照片
            pictureBox1.BackgroundImage = reg;
            pictureBox2.BackgroundImage = reg;

            //輸入長寬到label
            label1.Text = m_openorsavepicture.get_widthxHeight((Bitmap)pictureBox1.BackgroundImage);
            label2.Text = "修改後" + m_openorsavepicture.get_widthxHeight((Bitmap)pictureBox2.BackgroundImage);
        }
Пример #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            OpenorSavePicture save = new OpenorSavePicture();

            save.SavePicture((Bitmap)pictureBox2.BackgroundImage);
        }