Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string oldpath = @"C:\Users\dell\Pictures\气泡星云.jpg";
            string newpath = @"F:\testXiangmu\picHelp\picHelp\uppic\";

            ImageClass.MakeThumbnail(oldpath, newpath, 6700, 3200, "HW");
            txtboxPath = null;
        }
Example #2
0
 private void btnThumbnail_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(CBOboxStyleThum.Text) && !string.IsNullOrEmpty(txtHeight.Text) && !string.IsNullOrEmpty(txtWidth.Text))
     {
         OpenFileDialog dialog = new OpenFileDialog();
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             this.txtboxPath.SelectedText = dialog.FileName;
             string txtoldpath = dialog.FileName;//this.txtboxPath.Text;
             string newpath    = @"F:\testXiangmu\picHelp\picHelp\uppic\";
             ImageClass.MakeThumbnail(txtoldpath, newpath, Convert.ToInt32(txtWidth.Text), Convert.ToInt32(txtHeight.Text), CBOboxStyleThum.Text);
             this.txtboxPath.Text = null;
         }
     }
     else
     {
         MessageBox.Show("缩略方式,宽高度不能为空!");
         txtboxPath = null;
     }
 }