コード例 #1
0
        public mainWin()
        {
            InitializeComponent();
            comboBox_distortWay.SelectedIndex   = 0;
            comboBox_interpMethod.SelectedIndex = 0;
            comboBox_interpFace.SelectedIndex   = 0;
            trackBar_ballHeight.Maximum         = 21;
            trackBar_ballHeight.Value           = trackBar_ballHeight.Maximum / 2;

            face_class = new Face_distort();
        }
コード例 #2
0
        //选做任务 目标图片改变
        private void comboBox_aimFace_SelectedIndexChanged(object sender, EventArgs e)
        {
            int    pic_num  = comboBox_aimFace.SelectedIndex + 1;
            string pic_root = "face-images\\" + pic_num.ToString() + ".jpg";

            if (!File.Exists(pic_root))
            {
                DialogResult dr = MessageBox.Show("请将face-images文件夹放到项目bin/Release或Debug目录下!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            double scale;
            Bitmap bm_source = show_img_resize(pic_root, pictureBox_aimFace, out scale);

            Face_distort.set_ps(pic_num, out face_class.aim_ps, scale, bm_source);
        }