Ejemplo n.º 1
0
 private void SetDivisionScheme()
 {
     ImageOperationsWrapper.SetDivisionScheme(HasLayerOfPeriphery, HasLayersOfRegions, HasLayerOfMiscellaneous);
     ImageOperationsWrapper.SetColorsForDivision(allColorsOfRegions, ColorValueOfPeriphery, ColorValueOfMiscellaneous);
     ImageOperationsWrapper.SetOrderOfRegions(OrderOfRegions);
     ImageOperationsWrapper.SetBackgroundStyle(HasLayerOfBackground, BackgroundStyle);
     ImageOperationsWrapper.SetLayerOptions(BlendMode, OpacityOfLayers);
     ImageOperationsWrapper.SetThreshold(ThresholdOfLines);
     ImageOperationsWrapper.SetReferenceOfPeriphery(ReferenceCorner);
     ImageOperationsWrapper.SetPeripheryManagement(ExcludesPeriphery);
     ImageOperationsWrapper.SetColorOverwhelming(LaysColorOverLines, MaxThicknessOfLines, IsOpeningEnabled);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Execute image export(asynchronous execution).
        /// </summary>
        private async void ExportAsync()
        {
            await Task.Run(() =>
            {
                // Set operation settings (Native).
                SetDivisionScheme();

                // Execute operation (Native).
                ImageOperationsWrapper.ExecuteDividing(exportFilePath, sourceFilePath, exportStyle);

                // After native method execution.
                var currentdispatcher = Application.Current.Dispatcher;
                currentdispatcher.Invoke(() =>
                {
                    IsBusy = false;
                });
            });
        }