Пример #1
0
        public cipFormLightnessContrast(Image image, Raster source)
        {
            InitializeComponent();

            CipSize size = new CipSize(image.Size);
            CipSize newSize = Resample.SizeAdaptHeight(size, 200);
            Resample resampleFIlter = new Resample(newSize, CipInterpolationMode.BicubicSpline);
            raster = resampleFIlter.ProcessWithoutWorker(source);
            this.ThumbnailBitmap = raster.ToBitmap();
            this.pBoxPreview.Image = this.ThumbnailBitmap;

            thread = new Thread(new ThreadStart(this.ReDraw));
            thread.Priority = ThreadPriority.Normal;
        }
Пример #2
0
        public cipFormSmoothing(Image image, Raster source, System.Globalization.CultureInfo selectedCulture)
        {
            Thread.CurrentThread.CurrentUICulture = selectedCulture;
            InitializeComponent();

            CipSize size = new CipSize(image.Size);
            CipSize newSize = Resample.SizeAdaptHeight(size, 200);
            Resample resampleFIlter = new Resample(newSize, CipInterpolationMode.BicubicSpline);
            raster = resampleFIlter.ProcessWithoutWorker(source);
            this.ThumbnailBitmap = raster.ToBitmap();
            this.pBoxPreview.Image = this.ThumbnailBitmap;

            thread = new Thread(new ThreadStart(this.ReDraw));
            thread.Priority = ThreadPriority.Normal;
        }
Пример #3
0
        public cipFormHistogram(Image image,Raster source)
        {
            InitializeComponent();
            level = trackBarThreshold.Value / 1000f;
            textBoxLevel.Text = Convert.ToString(this.level);

            CipSize size = new CipSize(image.Size);
            CipSize newSize = Resample.SizeAdaptHeight(size, 200);
            Resample resampleFIlter = new Resample(newSize, CipInterpolationMode.BicubicSpline);
            raster = resampleFIlter.ProcessWithoutWorker(source);
            this.ThumbnailBitmap = raster.ToBitmap();
            this.pBoxPreview.Image = this.ThumbnailBitmap;

            thread = new Thread(new ThreadStart(this.ReDraw));
            thread.Priority = ThreadPriority.Normal;
        }
Пример #4
0
        private void resampleToolStripMenuItem_Click(object sender, EventArgs e)
        {
            cipFormResample form = new cipFormResample(this.picBoxModifyed.Image);

            if (form.ShowDialog()==DialogResult.OK)
            {
                if (!backgroundWorkerCip.IsBusy)
                {
                    ImageFilter filter = new Resample(form.NewImageSize, form.Mode);
                    backgroundWorkerCip.RunWorkerAsync(filter);
                    this.CalculateHistogram();
                }
            }
        }