Exemplo n.º 1
0
        public Histogram(ImageWindow iw)
        {
            InitializeComponent();
            MdiParent            = iw.MdiParent;
            Text                 = Text + " " + iw.Text;
            image                = iw.getBitmap();
            HistogramImage.Image = new Bitmap(HistogramImage.Width, HistogramImage.Height);
            LUT = (UInt32[, ])iw.LUT.Clone();

            max = 0;
            for (int i = 0; i < 256; i++)
            {
                if (LUT[0, i] > max)
                {
                    max = LUT[0, i];
                }
                if (LUT[1, i] > max)
                {
                    max = LUT[1, i];
                }
                if (LUT[2, i] > max)
                {
                    max = LUT[2, i];
                }
                if (LUT[3, i] > max)
                {
                    max = LUT[3, i];
                }
            }

            Histogram_ResizeEnd();
            Show();
        }
Exemplo n.º 2
0
        public Treshold(ImageWindow iw)
        {
            InitializeComponent();
            this.iw = iw;
            MdiParent = iw.MdiParent;
            Text = Text + " " + iw.Text;
            HistogramImage.Image = new Bitmap(HistogramImage.Width, HistogramImage.Height);
            LUT = (UInt32[,])iw.LUT.Clone();

            max = 0;
            for (int i = 0; i < 256; i++)
            {
                if (LUT[0, i] > max) max = LUT[0, i];
                if (LUT[1, i] > max) max = LUT[1, i];
                if (LUT[2, i] > max) max = LUT[2, i];
                if (LUT[3, i] > max) max = LUT[3, i];
            }

            prevImg = iw.getBitmap();
            iw.Treshold(ZipVal.Value,Reverse.Checked);
            hHeight = HistogramImage.Height;
            hWidth = HistogramImage.Width;
            x_scale = ((float)hWidth - 10.0F) / 256.0F;
            y_scale = ((float)hHeight - 15.0F) / (float)max;

            DrawHistogram();
            Show();
        }
Exemplo n.º 3
0
        public Median(ImageWindow iw)
        {
            InitializeComponent();
            MdiParent = iw.MdiParent;
            prevImage = iw.getBitmap();
            this.iw   = iw;

            xSize_ValueChanged();
            Show();
        }
Exemplo n.º 4
0
        public Median(ImageWindow iw)
        {
            InitializeComponent();
            MdiParent = iw.MdiParent;
            prevImage = iw.getBitmap();
            this.iw = iw;

            xSize_ValueChanged();
            Show();
        }
Exemplo n.º 5
0
        public Gamma(ImageWindow iw)
        {
            InitializeComponent();
            this.iw = iw;
            MdiParent = iw.MdiParent;
            Text = Text + " " + iw.Text;
            prevImg = iw.getBitmap();

            iw.Gamma(ZipVal.Value);
            Show();
        }
Exemplo n.º 6
0
        public Posterization(ImageWindow iw)
        {
            InitializeComponent();
            this.iw   = iw;
            MdiParent = iw.MdiParent;
            Text      = Text + " " + iw.Text;
            prevImg   = iw.getBitmap();

            iw.Posterize(ZipVal.Value);
            Show();
        }
Exemplo n.º 7
0
        public Brightness(ImageWindow iw)
        {
            InitializeComponent();
            this.iw = iw;
            MdiParent = iw.MdiParent;
            Text = Text + " " + iw.Text;
            prevImg = iw.getBitmap();

            iw.Brightness(ZipVal.Value - 101);
            Show();
        }
Exemplo n.º 8
0
        // take Image from another ImageWindow
        public ImageWindow(ImageWindow iw)
        {
            InitializeComponent();
            MdiParent = iw.MdiParent;
            Picture.Image = iw.getBitmap();

            Text = iw.Text + " (" + iw.CopyNumber++.ToString() + ")";
            LUT = (UInt32[,])iw.LUT.Clone();
            Width = iw.Width;
            Height = iw.Height;
            Show();
        }
Exemplo n.º 9
0
        public Contrast(ImageWindow iw)
        {
            InitializeComponent();
            this.iw   = iw;
            MdiParent = iw.MdiParent;
            Text      = Text + " " + iw.Text;
            prevImg   = iw.getBitmap();


            iw.Contrast(ZipVal.Value);
            Show();
        }
Exemplo n.º 10
0
        public Brightness(ImageWindow iw)
        {
            InitializeComponent();
            this.iw   = iw;
            MdiParent = iw.MdiParent;
            Text      = Text + " " + iw.Text;
            prevImg   = iw.getBitmap();


            iw.Brightness(ZipVal.Value - 101);
            Show();
        }
Exemplo n.º 11
0
        public ImageWindow(ImageWindow iw) // take Image from another ImageWindow
        {
            InitializeComponent();
            MdiParent     = iw.MdiParent;
            Picture.Image = iw.getBitmap();

            Text   = iw.Text + " (" + iw.CopyNumber++.ToString() + ")";
            LUT    = (UInt32[, ])iw.LUT.Clone();
            Width  = iw.Width;
            Height = iw.Height;
            Show();
        }
Exemplo n.º 12
0
        public Compression(ImageWindow iw)
        {
            InitializeComponent();
            picture = iw.getBitmap();
            before_size = picture.Width * picture.Height;
            bSize.Text = before_size.ToString();
            MdiParent = iw.MdiParent;
            Compressor.SelectedIndex = 0;
            z = 0;
            x = 2;
            counter = 0;
            after = 0;
            power = 2;
            how_many = 0;
            budujTablice();

            Show();
        }
Exemplo n.º 13
0
        public Compression(ImageWindow iw)
        {
            InitializeComponent();
            picture     = iw.getBitmap();
            before_size = picture.Width * picture.Height;
            bSize.Text  = before_size.ToString();
            MdiParent   = iw.MdiParent;
            Compressor.SelectedIndex = 0;
            z        = 0;
            x        = 2;
            counter  = 0;
            after    = 0;
            power    = 2;
            how_many = 0;
            budujTablice();

            Show();
        }
Exemplo n.º 14
0
        public Histogram(ImageWindow iw)
        {
            InitializeComponent();
            MdiParent = iw.MdiParent;
            Text = Text + " " + iw.Text;
            image = iw.getBitmap();
            HistogramImage.Image = new Bitmap(HistogramImage.Width, HistogramImage.Height);
            LUT = (UInt32[,])iw.LUT.Clone();

            max = 0;
            for (int i = 0; i < 256; i++)
            {
                if (LUT[0, i] > max) max = LUT[0, i];
                if (LUT[1, i] > max) max = LUT[1, i];
                if (LUT[2, i] > max) max = LUT[2, i];
                if (LUT[3, i] > max) max = LUT[3, i];
            }

            Histogram_ResizeEnd();
            Show();
        }
Exemplo n.º 15
0
        public Treshold(ImageWindow iw)
        {
            InitializeComponent();
            this.iw              = iw;
            MdiParent            = iw.MdiParent;
            Text                 = Text + " " + iw.Text;
            HistogramImage.Image = new Bitmap(HistogramImage.Width, HistogramImage.Height);
            LUT = (UInt32[, ])iw.LUT.Clone();

            max = 0;
            for (int i = 0; i < 256; i++)
            {
                if (LUT[0, i] > max)
                {
                    max = LUT[0, i];
                }
                if (LUT[1, i] > max)
                {
                    max = LUT[1, i];
                }
                if (LUT[2, i] > max)
                {
                    max = LUT[2, i];
                }
                if (LUT[3, i] > max)
                {
                    max = LUT[3, i];
                }
            }

            prevImg = iw.getBitmap();
            iw.Treshold(ZipVal.Value, Reverse.Checked);
            hHeight = HistogramImage.Height;
            hWidth  = HistogramImage.Width;
            x_scale = ((float)hWidth - 10.0F) / 256.0F;
            y_scale = ((float)hHeight - 15.0F) / (float)max;

            DrawHistogram();
            Show();
        }
Exemplo n.º 16
0
 private void MenuFile_Save_Click(object sender, EventArgs e) // save open file - available for open, not duplicated images
 {
     aiw.getBitmap().Save(aiw.getFilepath());
 }