Ejemplo n.º 1
0
        public cipFormResample(Image image)
        {
            InitializeComponent();

            this.radioButtonSizeFactor.Checked = false;
            this.radioButtonPixels.Checked = false;
            this.radioButtonStandart.Checked = true;
            this.textBoxSizeFactor.Enabled = false;
            this.numericUpDownWidth.Enabled = false;
            this.numericUpDownHeight.Enabled = false;
            this.comboBoxStandartSizes.Enabled = true;

            oldSize = new CipSize(image.Width, image.Height);
            nSize = new CipSize(oldSize);
            this.labelOriginalSizeVar.Text = oldSize.ToString();
            this.CipShowNewSize();
            this.CipChangeNumericSize();
            this.comboBoxStandartSizes.SelectedIndex = 0;
            this.comboBoxFilter.SelectedIndex = 1;
            this.mode = CipInterpolationMode.BicubicSpline;
            
        }
Ejemplo n.º 2
0
 private void comboBoxFilter_SelectedIndexChanged(object sender, EventArgs e)
 {
     switch (this.comboBoxFilter.SelectedIndex)
     {
         case 0:
             {
                 this.mode = CipInterpolationMode.NearestPixel;
                 break;
             }
         case 1:
             {
                 this.mode = CipInterpolationMode.BicubicSpline;
                 break;
             }
         case 2:
             {
                 this.mode = CipInterpolationMode.Bilinear;
                 break;
             }
     }
 }