private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Image i = new Image();
            //i.processImages();

            try
            {
                ImageColorData2 iCD = new ImageColorData2();
                ImageAnalysis ia = new ImageAnalysis();
                Bitmap img = new Bitmap("C:\\Users\\Administrator\\Desktop\\red.jpg");

                //C:\\Users\\Administrator\\Desktop\\images\\1.jpg");
                //( new Uri("Images/1.jpg", UriKind.Relative).AbsolutePath);
                Dictionary<String, List<Color>> colorStructsOfImage = iCD.getColorsInImage(img);
                float avgBrightnessByColor = iCD.calcAverageBrightnessByColor("Red");
                float percentageOfColor = iCD.percentageOfColorInImage("Red");
                label8.Content = "PERCENTAGE BY COLOR";
                label1.Content = "Violet     " + iCD.percentageOfColorInImage("Violet").ToString();
                label2.Content = "Indigo     " + iCD.percentageOfColorInImage("Indigo").ToString();
                label3.Content = "Blue     " + iCD.percentageOfColorInImage("Blue").ToString();
                label4.Content = "Green     " + iCD.percentageOfColorInImage("Green").ToString();
                label5.Content = "Yellow     " + iCD.percentageOfColorInImage("Yellow").ToString();
                label6.Content = "Orange     " + iCD.percentageOfColorInImage("Orange").ToString();
                label7.Content = "Red     " + iCD.percentageOfColorInImage("Red").ToString();
                label9.Content = "BRIGHTNESS BY COLOR";
                label17.Content = "Violet     " + iCD.calcAverageBrightnessByColor("Violet").ToString();
                label18.Content = "Indigo     " + iCD.calcAverageBrightnessByColor("Indigo").ToString();
                label19.Content = "Blue     " + iCD.calcAverageBrightnessByColor("Blue").ToString();
                label20.Content = "Green     " + iCD.calcAverageBrightnessByColor("Green").ToString();
                label21.Content = "Yellow     " + iCD.calcAverageBrightnessByColor("Yellow").ToString();
                label22.Content = "Orange     " + iCD.calcAverageBrightnessByColor("Orange").ToString();
                label23.Content = "Red     " + iCD.calcAverageBrightnessByColor("Red").ToString();

                this.splMain.Children.Add(label8);
                this.splMain.Children.Add(label1);
                this.splMain.Children.Add(label2);
                this.splMain.Children.Add(label3);
                this.splMain.Children.Add(label4);
                this.splMain.Children.Add(label5);
                this.splMain.Children.Add(label6);
                this.splMain.Children.Add(label7);
                this.splMain.Children.Add(label9);
                this.splMain.Children.Add(label17);
                this.splMain.Children.Add(label18);
                this.splMain.Children.Add(label19);
                this.splMain.Children.Add(label20);
                this.splMain.Children.Add(label21);
                this.splMain.Children.Add(label22);
                this.splMain.Children.Add(label23);

            }

            catch (Exception ee)
            {

            }
        }
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Image i = new Image();

            //i.processImages();

            try
            {
                ImageColorData2 iCD = new ImageColorData2();
                ImageAnalysis   ia  = new ImageAnalysis();
                Bitmap          img = new Bitmap("C:\\Users\\Administrator\\Desktop\\red.jpg");

                //C:\\Users\\Administrator\\Desktop\\images\\1.jpg");
                //( new Uri("Images/1.jpg", UriKind.Relative).AbsolutePath);
                Dictionary <String, List <Color> > colorStructsOfImage = iCD.getColorsInImage(img);
                float avgBrightnessByColor = iCD.calcAverageBrightnessByColor("Red");
                float percentageOfColor    = iCD.percentageOfColorInImage("Red");
                label8.Content  = "PERCENTAGE BY COLOR";
                label1.Content  = "Violet     " + iCD.percentageOfColorInImage("Violet").ToString();
                label2.Content  = "Indigo     " + iCD.percentageOfColorInImage("Indigo").ToString();
                label3.Content  = "Blue     " + iCD.percentageOfColorInImage("Blue").ToString();
                label4.Content  = "Green     " + iCD.percentageOfColorInImage("Green").ToString();
                label5.Content  = "Yellow     " + iCD.percentageOfColorInImage("Yellow").ToString();
                label6.Content  = "Orange     " + iCD.percentageOfColorInImage("Orange").ToString();
                label7.Content  = "Red     " + iCD.percentageOfColorInImage("Red").ToString();
                label9.Content  = "BRIGHTNESS BY COLOR";
                label17.Content = "Violet     " + iCD.calcAverageBrightnessByColor("Violet").ToString();
                label18.Content = "Indigo     " + iCD.calcAverageBrightnessByColor("Indigo").ToString();
                label19.Content = "Blue     " + iCD.calcAverageBrightnessByColor("Blue").ToString();
                label20.Content = "Green     " + iCD.calcAverageBrightnessByColor("Green").ToString();
                label21.Content = "Yellow     " + iCD.calcAverageBrightnessByColor("Yellow").ToString();
                label22.Content = "Orange     " + iCD.calcAverageBrightnessByColor("Orange").ToString();
                label23.Content = "Red     " + iCD.calcAverageBrightnessByColor("Red").ToString();

                this.splMain.Children.Add(label8);
                this.splMain.Children.Add(label1);
                this.splMain.Children.Add(label2);
                this.splMain.Children.Add(label3);
                this.splMain.Children.Add(label4);
                this.splMain.Children.Add(label5);
                this.splMain.Children.Add(label6);
                this.splMain.Children.Add(label7);
                this.splMain.Children.Add(label9);
                this.splMain.Children.Add(label17);
                this.splMain.Children.Add(label18);
                this.splMain.Children.Add(label19);
                this.splMain.Children.Add(label20);
                this.splMain.Children.Add(label21);
                this.splMain.Children.Add(label22);
                this.splMain.Children.Add(label23);
            }

            catch (Exception ee)
            {
            }
        }