private void DestColorSpaceComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (IsWindowInitialized == true)
            {
                var cb       = sender as ComboBox;
                int selected = cb.SelectedIndex;
                int from     = SourceColorSpaceComboBox.SelectedIndex;

                DestImageColorProfile = new ColorProfileNotifyChange(ColorProfileFactory.GetFactory().GetColorProfile((ColorProfileEnum)selected));

                ColorProfileConverter.ConvertImage(SourceImageColorArray, DestImageColorArray, (ColorProfileEnum)from, (ColorProfileEnum)selected);
                Paint.CopyToWriteableBitmap(DestImageWB, DestImageColorArray);
            }
        }
 private void SetVariables()
 {
     ColorSpaceList = new List <string>
     {
         "sRGB",
         "Adobe RGB",
         "Apple RGB",
         "CIE RGB",
         "Wide Gamut",
         "PAL/SECAM"
     };
     SourceImageCP          = new ColorProfileNotifyChange(ColorProfileFactory.GetFactory().sRBGcolorProfile);
     DestImageCP            = new ColorProfileNotifyChange(ColorProfileFactory.GetFactory().WideGamutcolorProfile);
     GrayscaleButtonClicked = false;
     KMeansParam            = Globals.k_means;
     MaxIter                    = Globals.max_iter;
     worker.DoWork             += worker_DoWork;
     worker.RunWorkerCompleted += worker_RunWorkerCompleted;
 }