コード例 #1
0
        public void SomeEvent()
        {
            effects          = new Effects();
            modes            = new BlendModes(Layers.CurrentLayer);
            pictureBox.Image = Layers.CurrentLayer.Foreground.EditImage;
            PreviewSizeChange();

            layers_imageList.Images.Clear();
            layers_listView.Items.Clear();

            for (int i = 0; i < layers.LayersArray.Length; i++)
            {
                layers_imageList.Images.Add(layers.LayersArray[i].Foreground.EditImage);
                layers_listView.Items.Add(layers.LayersArray[i].Name);
                layers_listView.Items[i].ImageIndex = i;
            }

            history_imageList.Images.Clear();
            history_listView.Items.Clear();
            for (int i = 0; i < History.HistoryList.Count; i++)
            {
                history_imageList.Images.Add(History.HistoryList[i].Picture.EditImage);
                history_listView.Items.Add(History.HistoryList[i].Action);
                history_listView.Items[i].ImageIndex = i;
            }

            Histogramm h = new Histogramm(Layers.CurrentLayer.Foreground);

            histogramm_chart.Series[0].Points.DataBindY(h.GetHistogramm(HistogramType.Brightness));

            RefreshColorChanelsView();
        }
コード例 #2
0
ファイル: UcPicture.cs プロジェクト: Antash/rda
        private void button4_Click(object sender, EventArgs e)
        {
            hRed = new Histogramm((Bitmap)pictureBox1.Image, 0);
            var bmp = hRed.Evaluate();

            pictureBox1.Image = bmp;
            convertFromImage(bmp);
            _p = bmp;
        }
コード例 #3
0
        public void ChangeCurrentPicture()
        {
            if (History.HistoryList.Count > 1)
            {
                Layers.CurrentLayer = new Layer("Слой 0",
                                                new Picture(History.HistoryList[History.CurrentId - 1].Picture.EditImage), Layers.CurrentLayer.Background);

                Histogramm h = new Histogramm(Layers.CurrentLayer.Foreground);
                histogramm_chart.Series[0].Points.DataBindY(h.GetHistogramm(HistogramType.Brightness));
                RefreshColorChanelsView();

                effects          = new Effects(Layers.CurrentLayer.Foreground);
                pictureBox.Image = Layers.CurrentLayer.Foreground.EditImage;
                PreviewSizeChange();
            }
        }
コード例 #4
0
        private void history_listView_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (history_listView.SelectedIndices.Count > 0)
            {
                History.CurrentId   = history_listView.SelectedIndices[0];
                Layers.CurrentLayer = new Layer("Слой 0",
                                                new Picture(History.HistoryList[History.CurrentId].Picture.EditImage), Layers.CurrentLayer.Background);

                Histogramm h = new Histogramm(Layers.CurrentLayer.Foreground);
                histogramm_chart.Series[0].Points.DataBindY(h.GetHistogramm(HistogramType.Brightness));
                RefreshColorChanelsView();

                effects          = new Effects(Layers.CurrentLayer.Foreground);
                pictureBox.Image = Layers.CurrentLayer.Foreground.EditImage;
                PreviewSizeChange();
            }
        }
コード例 #5
0
        public BinarizationForm(Form1 form)
        {
            InitializeComponent();
            this.form = form;

            if (Layers.CurrentLayer != null)
            {
                effects = new PLL.Effects(Layers.CurrentLayer.Foreground);

                effects.Binarization(trackBar1.Value);
                form.pictureBox.Refresh();

                value_textBox.Text = trackBar1.Value.ToString();
                form.pictureBox.Refresh();

                h = new Histogramm(Layers.CurrentLayer.Foreground);
                chart_Histogram.Series[0].Points.DataBindY(h.GetHistogramm(HistogramType.Brightness));
            }
        }
コード例 #6
0
 public void CalcHistogramm(int count)
 {
     Histogramm       = Indicator.CalcHistogramm(count);
     HistogrammDouble = Histogramm.Select(v => v.Y).ToArray();
 }
コード例 #7
0
ファイル: UcPicture.cs プロジェクト: Antash/rda
 private void button2_Click(object sender, EventArgs e)
 {
     hRed = new Histogramm((Bitmap)pictureBox1.Image, 0);
     hRed.DrawHistogramm(ref pictureBox2);
 }